Hi, I have a problem where I want to toggle between JDBC and Git Backend repository property source. I do not want to use composite repositories. I want only one to be active when the config server boots up.
How can I achieve this?
Comment From: ryanjbaxter
Why wouldnt using profiles work?
Comment From: amit88265
In the below configuration, if I enable only jdbc in profile yet it demands proper configuration for git like proper git repo URL and auths for that.
I want to avoid git-related configuration if I enable only jdbc in the profile. And If I enable Git only then config server should require that.
``
config:
server:
jdbc:
order: 1
sql: SELECT ky,val from ${spring.flyway.schemas}.PROPERTIES where APPLICATION=? and PROFILE=? and LABEL=?
git:
order: 2
defaultLabel: ${BRANCH:develop}
uri: ${GIT_URI:https://bitbucket.org/deploy}
Comment From: ryanjbaxter
That should be possible separating configuration into different documents that are activated depending on the profile
Comment From: amit88265
@ryanjbaxter Thank you so much for the solution. This is what I was looking for.