duplicate PropertySourcesPlaceholderConfigurer causes placeholders not working anymore
Environment (Required on creation)
cib seven 2.0.0
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
SevenWebclientContext adds a Bean of type PropertySourcesPlaceholderConfigurer with bean name placeholderConfigurer. Spring-Boot does the same in PropertyPlaceholderAutoConfiguration but with a different name propertySourcesPlaceholderConfigurer this results in two beans defined with same type but different names and fails in PropertySourcesDeducer. Result is that no placeholders are working because when more than one bean is found null is returned in spring boot
also a line
2025-05-12T14:14:17.949+02:00 WARN 134123 --- [web-ui] [ main] o.s.b.c.p.PropertySourcesDeducer : Multiple PropertySourcesPlaceholderConfigurer beans registered [propertySourcesPlaceholderConfigurer, placeholderConfigurer], falling back to Environment
is logged
Steps to reproduce (Required on creation)
Observed Behavior (Required on creation)
Two beans of type PropertySourcesPlaceholderConfigurer are defined
Expected behavior (Required on creation)
only one bean of type PropertySourcesPlaceholderConfigurer should be defined
Root Cause (Required on prioritization)
Solution Ideas
- adding
@Primaryto bean definition inSevenWebclientContext - do not define it at all (Spring boot does it anyay)
- add some Guard to bean definition in
SevenWebclientContextlike@ConditionalOnMissingBean
Hints
Links
Breakdown
### Pull Requests