I have question about placeholder resolution priority when using consul-config
and vault-config
I created simple app using this information
My dependencies are:
dependencies {
compile('org.springframework.cloud:spring-cloud-starter-consul-config')
compile('org.springframework.cloud:spring-cloud-starter-vault-config')
compile('org.springframework.boot:spring-boot-starter-webflux')
compile('org.springframework.cloud:spring-cloud-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
Note that I'm not using service discovery.
Doing next step I created property foo.prop = consul
(in consul storage)
and foo.prop = vault
.
When using:
@Value("${foo.prop}")
private String prop;
I'm getting vault
as an output, but when I delete foo.prop
from vault and restart app, I will get consul
.
I did this few times in different combinations and seems vault config has higher priority over consul.
My question is where I can find information about resolving strategy.(Imagine that we added as third zookeeper-config
). Seems spring-core documentation keep quiet about this.