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
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.0</version>
<version>3.2.3</version>
<relativePath/> <!-- Lookup parent from repository -->
</parent>
......@@ -29,6 +29,18 @@
<sonar.organization>gitlab-univ-2</sonar.organization>
</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>
<!-- Spring Boot Starters -->
<dependency>
......@@ -47,7 +59,6 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>4.2.0</version>
</dependency>
<!-- Database drivers -->
......@@ -56,11 +67,7 @@
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
<!-- Removing MySQL dependency as PostgreSQL is the preferred DB for cloud deployment -->
<!-- H2 Database for testing -->
<dependency>
......
server:
address: 0.0.0.0
port: ${PORT:8080}
port: ${PORT:80}
error:
include-message: always
spring:
application:
name: user-management-service
datasource:
url: jdbc:postgresql://172.29.32.3:5432/bdd_assure
username: dbuser
password: ComplexPassword123!
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/userdb}
username: ${SPRING_DATASOURCE_USERNAME:postgres}
password: ${SPRING_DATASOURCE_PASSWORD:postgres}
driver-class-name: org.postgresql.Driver
jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate:
ddl-auto: update
properties:
hibernate:
'[format_sql]': true
show-sql: true
dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: true
eureka:
client:
......@@ -24,10 +27,12 @@ eureka:
registryFetchIntervalSeconds: 30
healthcheck:
enabled: true
register-with-eureka: true
fetch-registry: true
instance:
prefer-ip-address: true
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
non-secure-port-enabled: false
instance-id: ${spring.application.name}:${random.uuid}
......@@ -36,3 +41,12 @@ eureka:
leaseExpirationDurationInSeconds: 90
metadataMap:
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