-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
Marcel Overdijk opened SPR-9380 and commented
I have the blow AppConfig class in my project:
@Configuration
@ComponentScan(basePackages = { "my.project" })
@PropertySource({ "classpath:/META-INF/config.properties", "classpath:/META-INF/config-${my.runtime.environment}.properties" })
public class AppConfig {
private static Log LOG = LogFactory.getLog(AppConfig.class);
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
Resolving the ${my.runtime.environment} in the @PropertySource
does not work anymore in Spring 3.1.1 while I was just upgrading from 3.1.0.
The same code works fine in 3.1.0 but gives this error in 3.1.1:
Failed to load bean class: mt.project.config.AppConfig; nested exception is java.io.FileNotFoundException: class path resource [META-INF/config-${my.runtime.environment}.properties] cannot be opened because it does not exist
The config file exists and the system property is set (I logged that as well), and just to mention it again. In 3.1.0 this works fine.
Affects: 3.1.1
Issue Links:
- Fix regression in @PropertySource placeholder resolution [SPR-9133] #13772 Fix regression in
@PropertySource
placeholder resolution ("duplicates") - @PropertySource annotation with multiple values and a name fails to register all property sources [SPR-9127] #13766
@PropertySource
annotation with multiple values and a name fails to register all property sources ("duplicates")
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue