Springboot项目的小问题
时间:2019-12-10 18:49:07
收藏:0
阅读:76
在自定义配置中;
应用时:
@Configuration @PropertySource("classpath:/配置文件位置") @Value("${配置信息}")//定义到变量上
@Configuration
//引入的是主启动类所在项目的配置文件
@PropertySource("classpath:/properties/redis.properties")
原文:https://www.cnblogs.com/yunianzeng/p/12018341.html
评论(0)