diff --git a/pom.xml b/pom.xml
index 2df110b..a330caf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,129 +1,123 @@
- 4.0.0
-
- org.springframework.boot
- spring-boot-starter-parent
- 4.0.0
-
-
- com.CSO2
- support-service
- 0.0.1-SNAPSHOT
- support-service
- support-service of CSO2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 17
- 1.18.42
-
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
- org.springframework.boot
- spring-boot-starter-data-mongodb
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-devtools
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
-
-
- org.springframework.cloud
- spring-cloud-starter-loadbalancer
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.2.5
+
+ com.CSO2
+ support-service
+ 0.0.1-SNAPSHOT
+ support-service
+ support-service of CSO2
-
- org.postgresql
- postgresql
- runtime
-
-
- org.projectlombok
- lombok
- ${lombok.version}
- true
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.springframework.security
- spring-security-test
- test
-
-
+
+ 17
+ 1.18.42
+ 2023.0.0
-
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- 2025.1.0
- pom
- import
-
-
-
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
+
+
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
-
- org.projectlombok
- lombok
- ${lombok.version}
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
+
+
+ org.springframework.cloud
+ spring-cloud-starter-vault-config
+
-
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-data-mongodb
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ true
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+
+
+
+ org.postgresql
+ postgresql
+ runtime
+
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.security
+ spring-security-test
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 076e5ae..c77be3d 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,20 +1,21 @@
spring.application.name=support-service
server.port=${SERVER_PORT:8085}
-# PostgreSQL Configuration (override via env vars in production)
+# PostgreSQL Configuration
+# Passwords are injected at runtime from HashiCorp Vault (secret/cso2/services/support-service)
spring.datasource.url=${DATABASE_URL:jdbc:postgresql://localhost:5432/CSO2_support_service}
spring.datasource.username=${DATABASE_USERNAME:cso2}
-spring.datasource.password=${DATABASE_PASSWORD:password123}
+spring.datasource.password=${DATABASE_PASSWORD:local-dev-only-change-this}
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
-# MongoDB Configuration (override via env vars in production)
+# MongoDB Configuration
+# URI is injected at runtime from HashiCorp Vault (secret/cso2/services/support-service-mongo)
spring.data.mongodb.uri=${MONGODB_URI:mongodb://localhost:27017/CSO2_support_service}
# Feign Configuration
spring.cloud.openfeign.client.config.default.connectTimeout=5000
spring.cloud.openfeign.client.config.default.readTimeout=5000
-# Service URLs for Feign clients (override via env vars)
+# Service URLs
order.service.url=${ORDER_SERVICE_URL:http://localhost:8083}
-
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
new file mode 100644
index 0000000..b5c6ce1
--- /dev/null
+++ b/src/main/resources/application.yml
@@ -0,0 +1,56 @@
+# --- Support Service Configuration ---
+spring:
+ application:
+ name: support-service
+
+ # 1. Config Import: Load properties from Vault first
+ config:
+ import: "optional:vault://"
+
+ # 2. Vault Configuration
+ cloud:
+ vault:
+ enabled: true
+ uri: ${VAULT_ADDR:http://localhost:8200}
+ token: ${VAULT_TOKEN:my-root-token}
+ kv:
+ enabled: true
+ backend: kv
+ default-context: cs02-app
+ authentication: TOKEN
+
+ # 3. PostgreSQL Configuration
+ datasource:
+ # Correct Database Name
+ url: jdbc:postgresql://localhost:5432/CSO2_support_service
+ # Secrets fetched from Vault
+ username: ${db_username}
+ password: ${db_password}
+
+ # 4. JPA Configuration
+ jpa:
+ hibernate:
+ ddl-auto: update
+ properties:
+ hibernate:
+ dialect: org.hibernate.dialect.PostgreSQLDialect
+
+ # 5. MongoDB Configuration (Standard, not using Vault for now)
+ data:
+ mongodb:
+ # URI resolved from Vault key: support_mongodb_uri
+ uri: ${support_mongodb_uri:mongodb://localhost:27017/CSO2_support_service}
+
+# --- Server Port ---
+server:
+ port: 8085
+
+# --- Feign Configuration ---
+spring.cloud.openfeign.client.config.default:
+ connectTimeout: 5000
+ readTimeout: 5000
+
+# --- Custom Service URLs ---
+order:
+ service:
+ url: ${ORDER_SERVICE_URL:http://localhost:8083}
\ No newline at end of file