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

原文地址:https://www.cnblogs.com/shuaiandjun/p/7242609.html