properties 中不能用 username 作为变量,这种方式会注入自己的系统环境变量的 用户名
在原来xml改下多个
system-properties-mode="NEVER"
变成这样
<context:property-placeholder location="jdbc.properties" system-properties-mode="NEVER"/>
该属性有三个值:
-
FALLBACK — 默认值,不存在时覆盖
-
NEVER — 不覆盖
-
OVERRIDE — 覆盖