spring applicationcontext 加载 jdbc.properties异常

来源:互联网 发布:阿里云服务器端口开22 编辑:程序博客网 时间:2024/06/03 14:26

异常现象:java.lang.NumberFormatException: For input string: "${initialSize}"

问题原因:那是因为spring根本没有加载jdbc.properties文件

解决办法:1、如果是spring加载的本地jdbc.properties:<context:property-placeholder location="D:/opt/wf/jztappservice/jdbc.properties" ignore-unresolvable="true" />

2、如果是spring加载的项目下的src里的jdbc.properties,则 <context:property-placeholder location="../*.properties" ignore-unresolvable="true"order=“1”/>天津order="1"

0 0