/** * @ClassName: PropertiesConfig * @Description: 读取配置文件 * @author lml * @date 2019年10月23日 下午5:35:21 * */ @Configuration public class PropertiesConfig { @Bean public PropertySourcesPlaceholderConfigurer createPropertySourcesPlaceholderConfigurer() { ClassPathResource resource = new ClassPathResource("pay-dev.properties"); PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer(); propertyPlaceholderConfigurer.setLocation(resource); return propertyPlaceholderConfigurer; } }