From 76c4cb887899f911549a133c6c3f466d3df4e359 Mon Sep 17 00:00:00 2001 From: Santiago Faci Date: Wed, 8 Apr 2026 23:16:58 +0200 Subject: [PATCH] =?UTF-8?q?Configurado=20para=20cargar=20la=20configuraci?= =?UTF-8?q?=C3=B3n=20de=20un=20config=20server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- pom.xml | 17 ++++++++++++++--- .../resources/application-dev.properties.sample | 6 ------ src/main/resources/application-prod.properties | 6 ------ src/main/resources/application.properties | 6 ++---- 5 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 src/main/resources/application-dev.properties.sample delete mode 100644 src/main/resources/application-prod.properties diff --git a/Dockerfile b/Dockerfile index 6a948c5..cbc5764 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,4 @@ FROM eclipse-temurin:21-jdk-alpine VOLUME /tmp EXPOSE 8080 COPY target/games-0.1.jar app.jar -ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/pom.xml b/pom.xml index 6430cc2..d824bb7 100644 --- a/pom.xml +++ b/pom.xml @@ -59,10 +59,12 @@ spring-boot-starter-test test + - org.projectlombok - lombok - provided + org.springframework.cloud + spring-cloud-config-client + 4.3.2 + compile @@ -75,6 +77,15 @@ org.springframework.boot spring-boot-starter-validation + + + org.springframework.boot + spring-boot-devtools + + + org.springframework.boot + spring-boot-starter-actuator + diff --git a/src/main/resources/application-dev.properties.sample b/src/main/resources/application-dev.properties.sample deleted file mode 100644 index 4830fae..0000000 --- a/src/main/resources/application-dev.properties.sample +++ /dev/null @@ -1,6 +0,0 @@ -spring.datasource.url=jdbc:mariadb://localhost:3306/games -spring.datasource.username=games_user -spring.datasource.password=games_password -spring.jpa.database-platform=org.hibernate.dialect.MariaDBDialect - -logging.level.org.springframework=DEBUG diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties deleted file mode 100644 index 6b06448..0000000 --- a/src/main/resources/application-prod.properties +++ /dev/null @@ -1,6 +0,0 @@ -spring.datasource.url=jdbc:mariadb://games-db:3306/games -spring.datasource.username=games_user -spring.datasource.password=${GAMES_DATABASE_PASSWORD} -spring.jpa.database-platform=org.hibernate.dialect.MariaDBDialect - -logging.level.org.springframework=ERROR \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4534659..b280df2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,4 @@ spring.application.name=games -spring.profiles.active=prod server.port=8085 - -spring.jpa.hibernate.ddl-auto=update -spring.jpa.properties.hibernate.globally_quoted_identifiers=true +spring.config.import=optional:configserver:http://localhost:8888 +spring.devtools.livereload.enabled=true \ No newline at end of file