Skip to content
Advertisement

Tag: spring-properties

Spring PropertySourcesPlaceholderConfigurer beans: resolve property value at runtime

I am loading properties with multiple PropertySourcesPlaceholderConfigurer beans and setting placeholder prefix-es: While I can inject a property value by specifying it’s index and key like this: Sometimes I need to determine the value of the prefix (‘foo’) at runtime and dynamically resolve the property value. Is this possible? If not, which alternative solutions are recommended for this use case?

Advertisement