This commit is contained in:
2026-04-18 22:21:39 +03:00
parent 9f074ed8a8
commit 2b78bb84d3
11 changed files with 83 additions and 59 deletions
@@ -3,6 +3,7 @@ package com.jambotronGroup.jambotron;
import com.jambotronGroup.jambotron.fileUpload.FilesStorageService;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -11,11 +12,23 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.TimeZone;
@SpringBootApplication
public class JambotronApplication{
private static final Logger logger = LoggerFactory.getLogger(JambotronApplication.class);
public static void main(String[] args) {
// @PostConstruct
// public void init() {
// // Устанавливает UTC для всей JVM, где работает Spring
// TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
// }
public static void main(String[] args) {
// Set the timezone before the Spring context (and Flyway) starts
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
SpringApplication.run(JambotronApplication.class, args);
@@ -5,14 +5,14 @@ spring.application.name=jambotron
server.port=8082
#============Localhost Configurations========================
spring.datasource.url= jdbc:postgresql://localhost:5433/jambotronDB
spring.datasource.url= jdbc:postgresql://localhost:5433/jambotronDB?options=-c%20timezone=UTC
spring.datasource.username= admin
spring.datasource.password= postgrespw
spring.flyway.baseline-on-migrate=true
spring.flyway.validate-on-migrate=true
spring.flyway.url=jdbc:postgresql://localhost:5433/jambotronDB
spring.flyway.url=jdbc:postgresql://localhost:5433/jambotronDB?options=-c%20timezone=UTC
spring.flyway.user=admin
spring.flyway.password=postgrespw