Problem: I only have either JDBC OR Git working. Just one thing. If I change the property spring.cloud.config.server.bootstrap
to true
or false
.
Question: How do I configure my application to work with JDBC AND Git?
I am attaching the contents of the bootstrap.properties .
spring:
profiles:
active: jdbc, git
application:
name: configuration-server
cloud:
config:
uri: http://localhost:8888
name: configuration-server
server:
jdbc:
order: 1
git:
uri: <hidden>
order: 2
bus:
enabled: true
Solution: It turned out quite by accident to find out that with such a bundle, you need to use the parameters for JDBC: APPLICATION, PROFILE and LABEL, the same by which you can find the configuration in the GIT repository. At the same time, in the opposite direction - it works differently. That is, to get the configuration from the GIT repository, you do not need to create the necessary entries in the database. And that's all, despite the fact that the priority for JDBC is higher than that of GIT.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.