2

I'm setting a spring boot application that obtains its properties from a spring cloud config server application pointing to a Git config repository and to a Vault server.

Spring cloud config server application.properties:

spring.config.name=configserver
server.port=8888
spring.profiles.active=git,vault
# Config repository
spring.cloud.config.server.git.uri=...
spring.cloud.config.server.git.username=...
spring.cloud.config.server.git.password=...
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.default-label=local
spring.cloud.config.server.git.searchPaths={application}
# Vault connexion
spring.cloud.config.server.vault.port=8200
spring.cloud.config.server.vault.host=127.0.0.1

Spring client bootstrap.properties:

spring.application.name=app1
spring.profiles.active=local
server.port=8082
spring.cloud.config.uri=http://localhost:8888
spring.cloud.config.token=...

Like this, it works well for getting configuration properties from Git and Vault, but if in bootstrap.properties I use a comma-separated list for "spring.application.name" like:

spring.application.name=app1,app2

This only works for getting config properties from Git but no from Vault.

How can I make Spring config server to make Vault recognizes more than one folder, like in this case "secret/app1" and "secret/app2"?

jherencia
  • 71
  • 1
  • 4
  • what is the use case for recognizing multiple folders for a single application? – Here_2_learn May 16 '19 at 09:33
  • Sorry for answering a little late, the use case is the following. Different spring boot applications share some common properties, so these common properties are stored in a "common-app" folder, while the project has a properties folder for itself. So the spring application name value will be: ``` spring.application.name=common-app,app ``` For info, at the time I added this question I saw a ticket in the github project that solved this issue, that ticket was assigned to a version to be released. – jherencia Jan 07 '20 at 09:23
  • can you refer to the ticket link here, would give some info. – Here_2_learn Jan 07 '20 at 09:42
  • I didn't find the ticket. I hope this is already solved in the latest versions. – jherencia Jan 07 '20 at 13:23

0 Answers0