0

Iam setting up the Spring Cloud Config server Integration with Hashicorp Vault to read secrets. My Client Microservice should read the configuration from the config server at the time of start up.

below are my Spring Cloud Config configuration

server: port: 8888

Spring: application: name: v1/gi/apps/test/loginsecret_dev profiles: active: vault

cloud: vault: host: test.vault.test.net scheme: https app-role: role-id: ${ROLE_ID:0ebc-2e18-0ebc-9a46-44424545} secret-id: ${SECRET_ID:2f02-2f02-574c-786tyuutt} authentication: APPROLE uri: http://localhost:8888 kv: profile-separate: "/" backend: apps/test/loginsecret_dev config: server: vault: host: test.vault.test.net scheme: https backend: secret authentication: APPROLE app-role: role-id: ${ROLE_ID:0ebc-2e18-0ebc-9a46-44424545} secret-id: ${SECRET_ID:2f02-2f02-574c-786tyuutt} profile-separate: "/" application-name: v1/gi/apps/test/loginsecret_dev kv-version: 2 uri: http://localhost:8888

In the client microservies properites.yml file. I have configured properties as below

spring: application: name: v1/gi/apps/test/loginsecret_dev profiles: active: dev config: import: optional:configserver:${SPRING_CLOUD_CONFIG_URI:http://localhost:8888}

when iam trying to start my client microservice iam getting below error

Fetching config from server at : http://localhost:8888 2025-05-27T10:10:28.986-04:00 WARN 2972 --- [v1/gi/apps/test/loginsecret_dev] [ main] o.s.c.c.c.ConfigServerConfigDataLoader : Could not locate PropertySource ([ConfigServerConfigDataResource@1e287667 uris = array['http://localhost:8888'], optional = true, profiles = 'default']): 400
on GET request for "http://localhost:8888/v1%2Fgi%2Fapps%2Ftest%2Floginsecret_dev/default": "<!doctype html>HTTP Status 400 – Bad Request body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}

HTTP Status 400 – Bad Request

" 2025-05-27T10:10:29.812-04:00 INFO 2972 --- [v1/gi/apps/test/loginsecret_dev] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.

please guide me if doing wrong configuration anywhere that really help me

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.