spring利用注解@Value获取properties属性为null

原因可能有好几种

1、spring与spring mvc是两个容器,调用时候要分清哪个容器

2、@Component 并且 context:component-scan 

3、获取配置文件http://www.henryxi.com/read-values-from-properties-file-in-spring

posted @ 2017-07-26 23:39  帅LOVE俊  阅读(1543)  评论(0编辑  收藏  举报