From ee88068d99e54096c8c7d40ca8919f88aa3791b1 Mon Sep 17 00:00:00 2001 From: Pablo de la Torre Jamardo Date: Mon, 15 Sep 2025 08:28:36 +0200 Subject: [PATCH] refactor(config): clean YAML configuration --- bootstrap/src/main/resources/application.yml | 40 ++++++++------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/bootstrap/src/main/resources/application.yml b/bootstrap/src/main/resources/application.yml index 8b56cac..129ad43 100644 --- a/bootstrap/src/main/resources/application.yml +++ b/bootstrap/src/main/resources/application.yml @@ -1,9 +1,17 @@ info: app: version: @project.version@ + app: encryption: secret: ${APP_ENCRYPTION_SECRET} + +server: + port: 8080 + servlet: + context-path: /api + forward-headers-strategy: framework + spring: application: name: restemailbridge @@ -11,6 +19,12 @@ spring: resources: add-mappings: false + datasource: + url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:default_db} + username: ${DB_USER:postgres} + password: ${DB_PASSWORD:postgres} + driver-class-name: org.postgresql.Driver + jpa: hibernate: ddl-auto: validate @@ -18,6 +32,7 @@ spring: hibernate.transaction.jta.platform: org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform hibernate: format_sql: true + dialect: org.hibernate.dialect.PostgreSQLDialect show-sql: true jackson: @@ -31,31 +46,8 @@ springdoc: path: /swagger-ui show-actuator: true -server: - port: 8080 - servlet: - context-path: /api - forward-headers-strategy: framework - gmail: oauth2: clientId: ${GMAIL_OAUTH_CLIENT_ID} clientSecret: ${GMAIL_OAUTH_CLIENT_SECRET} - redirectUri: http://localhost:8888/Callback - ---- - -spring: - config: - activate: - on-profile: default - - datasource: - url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:default_db} - username: ${DB_USER:postgres} - password: ${DB_PASSWORD:postgres} - driver-class-name: org.postgresql.Driver - jpa: - properties: - hibernate: - dialect: org.hibernate.dialect.PostgreSQLDialect \ No newline at end of file + redirectUri: http://localhost:8888/Callback \ No newline at end of file