在自定义配置中;
应用时:
@Configuration @PropertySource("classpath:/配置文件位置") @Value("${配置信息}")//定义到变量上
@Configuration//引入的是主启动类所在项目的配置文件@PropertySource("classpath:/properties/redis.properties")
Springboot项目的小问题
原文:https://www.cnblogs.com/yunianzeng/p/12018341.html