FileNotFoundException: Could not open ServletContext resource [/jdbc.properties]

在搭建ssm框架时,报如下错误:

org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.properties]
解决:
思路:在配置jdbc的相关属性时,找不到信息。
方法:
改为<context:property-placeholder location="classpath:/jdbc.properties"/>即可。

你可能感兴趣的:(后台)