Giriş
Bu sınıf yerine yeni kodlarda PropertySourcesPlaceholderConfigurer kullanılmalı.
setLocations metodu
Şöyle yaparız.
Bu sınıf yerine yeni kodlarda PropertySourcesPlaceholderConfigurer kullanılmalı.
setLocations metodu
Şöyle yaparız.
@Bean
public static PropertyPlaceholderConfigurer properties() {
  PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
  Resource[] resources = new ClassPathResource[]{new ClassPathResource("dev.properties")};
  ppc.setLocations(resources);
  ppc.setIgnoreUnresolvablePlaceholders(true);
  return ppc;
} 
Hiç yorum yok:
Yorum Gönder