@Value 取不到值 或者直接输出了${name}

1、当取不到值时,看一下变量是否定义成了static

2、当输出${name},查看除了web.xml文件,其他xml文件中

       <context:property-placeholder ignore-unresolvable="true" location="classpath*:/properties/all.properties" />

是否存在

猜你喜欢

转载自blog.csdn.net/u012129030/article/details/80210742