Fix config data placeholder resolution active document logic
Update `ConfigDataEnvironmentContributor.isActive` so that unbound imports are no longer considered active. Prior to this commit, any `ConfigDataEnvironmentContributor` that had `null` properties was considered active. This is incorrect for `Kind.UNBOUND_IMPORT` contributors since we haven't yet bound the `spring.config.*` properties. The `ConfigDataEnvironmentContributorPlaceholdersResolver` has been updated to handle the refined logic. A placeholder can now be resolved from the current contributor, or from an unbound contributor by binding it on the fly. Fixes gh-29386pull/29667/head
parent
1c6471ef60
commit
3d46b06e8d
@ -0,0 +1 @@
|
||||
my.value=application-import-with-placeholder-in-earlier-document-imported
|
@ -0,0 +1,6 @@
|
||||
my.import=application-import-with-placeholder-in-earlier-document-imported
|
||||
#---
|
||||
my.value=should-be-ignored
|
||||
spring.config.activate.on-profile=missing
|
||||
#---
|
||||
spring.config.import=classpath:${my.import}.properties
|
@ -0,0 +1 @@
|
||||
my.value=application-import-with-placeholder-in-earlier-profile-document-imported
|
@ -0,0 +1,6 @@
|
||||
my.value=application-import-with-placeholder-in-earlier-profile-document
|
||||
#---
|
||||
my.import=application-import-with-placeholder-in-earlier-profile-document-imported
|
||||
spring.config.activate.on-profile=missing
|
||||
#---
|
||||
spring.config.import=classpath:${my.import}.properties
|
Loading…
Reference in New Issue