1、变量不能定义成static
2、当输出${name},查看在[servlet-name]-servlet.xml 文件中添加如下配置
<context:property-placeholder ignore-unresolvable="true" location="classpath*:/properties/all.properties" />
参考链接:https://blog.csdn.net/sinat_32366329/article/details/78339935?tdsourcetag=s_pctim_aiomsg