use of com.jim.framework.configcenter.spring.SpringPropertyInjectSupport in project jim-framework by jiangmin168168.
the class WebApplicationConfig method properties.
@Bean
public static PropertyPlaceholderConfigurer properties() {
SpringPropertyInjectSupport springPropertyInjectSupport = new SpringPropertyInjectSupport();
springPropertyInjectSupport.setConfigNameSpaces("configcenter/" + System.getProperty("env"));
springPropertyInjectSupport.init();
PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
Resource[] resources = new ClassPathResource[] { new ClassPathResource("application.properties") };
ppc.setLocations(resources);
ppc.setIgnoreUnresolvablePlaceholders(true);
return ppc;
}
Aggregations