Skip to content
Snippets Groups Projects
Commit ecc3261e authored by Abdellatif Kebraoui's avatar Abdellatif Kebraoui
Browse files

[FEAT] update dependencies and configuration for improved cloud deployment

parent e308dfa2
Branches
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.0</version> <version>3.2.3</version>
<relativePath/> <!-- Lookup parent from repository --> <relativePath/> <!-- Lookup parent from repository -->
</parent> </parent>
...@@ -29,6 +29,18 @@ ...@@ -29,6 +29,18 @@
<sonar.organization>gitlab-univ-2</sonar.organization> <sonar.organization>gitlab-univ-2</sonar.organization>
</properties> </properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>2023.0.1</version> <!-- Compatible with Spring Boot 3.2.x -->
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies> <dependencies>
<!-- Spring Boot Starters --> <!-- Spring Boot Starters -->
<dependency> <dependency>
...@@ -47,7 +59,6 @@ ...@@ -47,7 +59,6 @@
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>4.2.0</version>
</dependency> </dependency>
<!-- Database drivers --> <!-- Database drivers -->
...@@ -56,11 +67,7 @@ ...@@ -56,11 +67,7 @@
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<version>42.7.2</version> <version>42.7.2</version>
</dependency> </dependency>
<dependency> <!-- Removing MySQL dependency as PostgreSQL is the preferred DB for cloud deployment -->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
<!-- H2 Database for testing --> <!-- H2 Database for testing -->
<dependency> <dependency>
......
server: server:
address: 0.0.0.0 address: 0.0.0.0
port: ${PORT:8080} port: ${PORT:80}
error:
include-message: always
spring: spring:
application:
name: user-management-service
datasource: datasource:
url: jdbc:postgresql://172.29.32.3:5432/bdd_assure url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/userdb}
username: dbuser username: ${SPRING_DATASOURCE_USERNAME:postgres}
password: ComplexPassword123! password: ${SPRING_DATASOURCE_PASSWORD:postgres}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
jpa: jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate: hibernate:
ddl-auto: update ddl-auto: update
properties: properties:
hibernate: hibernate:
'[format_sql]': true dialect: org.hibernate.dialect.PostgreSQLDialect
show-sql: true format_sql: true
eureka: eureka:
client: client:
...@@ -24,10 +27,12 @@ eureka: ...@@ -24,10 +27,12 @@ eureka:
registryFetchIntervalSeconds: 30 registryFetchIntervalSeconds: 30
healthcheck: healthcheck:
enabled: true enabled: true
register-with-eureka: true
fetch-registry: true
instance: instance:
prefer-ip-address: true prefer-ip-address: true
hostname: ${K_SERVICE:user-management-service}.${K_REVISION:default}.${K_CONFIGURATION:default}.run.app hostname: ${K_SERVICE:user-management-service}.${K_REVISION:default}.${K_CONFIGURATION:default}.run.app
secure-port: ${PORT:8080} secure-port: ${PORT:80}
secure-port-enabled: true secure-port-enabled: true
non-secure-port-enabled: false non-secure-port-enabled: false
instance-id: ${spring.application.name}:${random.uuid} instance-id: ${spring.application.name}:${random.uuid}
...@@ -36,3 +41,12 @@ eureka: ...@@ -36,3 +41,12 @@ eureka:
leaseExpirationDurationInSeconds: 90 leaseExpirationDurationInSeconds: 90
metadataMap: metadataMap:
instanceId: ${spring.application.name}:${random.uuid} instanceId: ${spring.application.name}:${random.uuid}
management:
endpoints:
web:
exposure:
include: health,info
endpoint:
health:
show-details: always
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment