Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Took 9 minutes
  • Loading branch information
Firestone82 committed Jan 28, 2024
1 parent cbd4778 commit 0b3569e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/main/java/cz/trailsthroughshadows/api/TtsApiApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ public static void main(String[] args) {
// ObjectMapper mapper = new ObjectMapper();
// mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);

//.env file load
// Dotenv dotenv = Dotenv.configure().directory(".config").load();
//
// Map<String, Object> env = new HashMap<>();
// env.put("spring.datasource.url", dotenv.get("DB_HOST") + ":" + dotenv.get("DB_PORT") + "/" + dotenv.get("DB"));
// env.put("spring.datasource.driver-class-name", dotenv.get("DB_DRIVER"));
// env.put("spring.datasource.username", dotenv.get("DB_USER"));
// env.put("spring.datasource.password", dotenv.get("DB_PASSWORD"));
// //jdbc:mariadb://49.13.93.112:3306/tts_api
//
// SpringApplication app = new SpringApplication(TtsApiApplication.class);
// app.setDefaultProperties(env);
// app.run(args);
// log.debug("Running with login: " + dotenv.get("DB_USER") + " -> " + dotenv.get("DB_PASSWORD"));

SpringApplication.run(TtsApiApplication.class, args);
// .env file load
Dotenv dotenv = Dotenv.configure().directory(".config").load();

Map<String, Object> env = new HashMap<>();
env.put("spring.datasource.url", dotenv.get("DB_HOST") + ":" + dotenv.get("DB_PORT") + "/" + dotenv.get("DB"));
env.put("spring.datasource.driver-class-name", dotenv.get("DB_DRIVER"));
env.put("spring.datasource.username", dotenv.get("DB_USER"));
env.put("spring.datasource.password", dotenv.get("DB_PASSWORD"));
//jdbc:mariadb://49.13.93.112:3306/tts_api

SpringApplication app = new SpringApplication(TtsApiApplication.class);
app.setDefaultProperties(env);
app.run(args);
log.debug("Running with login: " + dotenv.get("DB_USER") + " -> " + dotenv.get("DB_PASSWORD"));

// SpringApplication.run(TtsApiApplication.class, args);
log.info("Docs running on http://localhost:8080/swagger-ui/index.html");
log.info("API running on http://localhost:8080/");
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spring.jpa.show-sql=true
springdoc.api-docs.path=/api-docs
springdoc.swagger-ui.path=/swagger-ui-custom.html
springdoc.swagger-ui.tagsSorter=alpha
server.forward-headers-strategy=framework

# Logging
logging.level.root=INFO
Expand Down

0 comments on commit 0b3569e

Please sign in to comment.