@Configuration
@PropertySources({
@PropertySource("classpath:redis.properties"),
@PropertySource("classpath:apple.properties")
})
public class PropertyConfig {
}
使用:
@Value("${apple.color}")
private String port;
@Configuration
@PropertySources({
@PropertySource("classpath:redis.properties"),
@PropertySource("classpath:apple.properties")
})
public class PropertyConfig {
}
使用:
@Value("${apple.color}")
private String port;