Properties
μ μ
μ¬μ©λ²
νλ‘νΌν°λͺ
=κ°
νλ‘νΌν°λͺ
=κ°
...1. PropertySourcesPlaceholderConfigurer λΉ λ±λ‘
@Configuration
public class Config {
@Bean
public static PropertySourcesPlaceholderConfigurer properties() {
PropertySourcesPlaceholderConfigurer configurer =
new PropertySourcesPlaceholderConfigurer();
configurer.setLocations(
new ClassPathResource("application.properties"),
new ClassPathResource("database.properties")
);
return configurer;
}
}2. @Value μ λ
Έν
μ΄μ
μ ν΅ν΄ νλ‘νΌν° κ° μ¬μ©
Last updated