Multiple Composite Repositories with JDBC + Native

时间:2018-03-23 00:26:44

标签: jdbc configuration server spring-cloud spring-cloud-config

How to create a composite repositories with 'native'+'jdbc'?

I tried different configurations, but the priority is always given to jdbc. Even when some config is only available in 'native' repository, the flow is always retrieved from jdbc. From the following configuration, what is expected is to retrieve first any existing configuration from file system. But only jdbc is considered.

spring.application.name=config-server
server.port=8888
spring.profiles.active=native,jdbc
spring.cloud.config.server.native.searchLocations=file:/data

spring.cloud.config.server.jdbc.order=2
spring.cloud.config.server.native.order=1

spring.datasource.url=jdbc:h2:./data/props_db
spring.datasource.username=omc
spring.datasource.password=omc

0 个答案:

没有答案