From 3dc3da15c2c9bc6129b047663eb6a26d45457e8f Mon Sep 17 00:00:00 2001
From: Abdellatif Kebraoui <Kebraoui.abdellatif@gmail.com>
Date: Fri, 28 Mar 2025 10:51:25 +0100
Subject: [PATCH] Revert "[REFAC] update configuration files for improved
 clarity and organization"

This reverts commit 14d4200ec4c9ae8c968e384d48fa983cac629afa.
---
 src/main/resources/application-cloud.yml  | 32 +----------------------
 src/main/resources/application-local.yml  | 17 ++----------
 src/main/resources/application.properties | 22 +++++++++++++++-
 3 files changed, 24 insertions(+), 47 deletions(-)

diff --git a/src/main/resources/application-cloud.yml b/src/main/resources/application-cloud.yml
index ee18fa6..3ff5034 100644
--- a/src/main/resources/application-cloud.yml
+++ b/src/main/resources/application-cloud.yml
@@ -12,34 +12,4 @@ spring:
     show-sql: true
     properties:
       hibernate:
-        dialect: org.hibernate.dialect.PostgreSQLDialect
-      javax:
-        persistence:
-          validation:
-            mode: auto
-  application:
-    name: user-management-service
-
-server:
-  address: 0.0.0.0
-  port: ${PORT:8080}
-
-# Disable Eureka client for cloud deployment
-eureka:
-  client:
-    enabled: false
-    register-with-eureka: false
-    fetch-registry: false
-
-# Direct service URLs for Cloud Run
-insurance-service:
-  url: https://insurance-service-682610574114.europe-west1.run.app
-
-incident-service:
-  url: https://incident-service-682610574114.europe-west1.run.app
-
-invoice-service:
-  url: https://invoice-service-682610574114.europe-west1.run.app
-
-notification-service:
-  url: https://notification-service-682610574114.europe-west1.run.app
+        format_sql: true
diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml
index 809a5ae..a9778e5 100644
--- a/src/main/resources/application-local.yml
+++ b/src/main/resources/application-local.yml
@@ -1,6 +1,6 @@
 spring:
   main:
-    banner-mode: OFF  # Masque le banner au démarrage
+    show-banner: false  # Masque le banner au démarrage
   thymeleaf:
     cache: false  # Désactive le cache pour Thymeleaf en développement
   datasource:
@@ -19,19 +19,6 @@ spring:
         persistence:
           validation:
             mode: auto
-  application:
-    name: user-management-service
 
 server:
-  port: 8082
-
-eureka:
-  instance:
-    prefer-ip-address: true
-    ip-address: 127.0.0.1
-    hostname: localhost
-  client:
-    serviceUrl:
-      defaultZone: http://localhost:8761/eureka/
-    register-with-eureka: true
-    fetch-registry: true
+  port: 8082
\ No newline at end of file
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 0fa59df..de9420a 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,3 +1,15 @@
+server.port=8082
+  
+# Masque le banner au démarrage
+spring.main.show-banner=false
+
+# Désactive le cache pour Thymeleaf en développement
+spring.thymeleaf.cache=false
+
+spring.datasource.url=jdbc:postgresql://localhost:5432/bdd_assure
+spring.datasource.username=postgres
+spring.datasource.password=root
+spring.datasource.driver-class-name=org.postgresql.Driver
 
 # Peut être 'validate', 'update', ou 'none' pour la production
 spring.jpa.hibernate.ddl-auto=update
@@ -13,5 +25,13 @@ logging.level.web=TRACE
 # Affiche les requêtes SQL si nécessaire
 logging.level.org.hibernate.SQL=DEBUG
 
+# URL du serveur Eureka
+eureka.instance.prefer-ip-address=true
+eureka.instance.ip-address=127.0.0.1
+eureka.instance.hostname=localhost
+
+eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
+spring.application.name=user-management-service
 
-spring.application.name=user-management-service
\ No newline at end of file
+eureka.client.register-with-eureka=true
+eureka.client.fetch-registry=true
-- 
GitLab