@Value、@ConfigurationProperties的使用和区别
@Value、@ConfigurationProperties的使用和区别
@Value
@Value("#{configProperties[‘u.uname’]}") 是基于spel表达式#{},通常用来获取bean的属性,或者调用bean的某个方法,还可以表示常量
@Controller
@Component
public class UserInfoController{
// 获...
原创
2019-06-04 11:47:37 ·
347 阅读 ·
0 评论