ssm整合报错2

 Context initialization failed
org.springframework.beans.factory.BeanInitializationException: Could not load properties; 
nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/db.properties]

出错原因:applicationContext中的

<context:property-placeholder location="db.properties"/>

要改为

 <context:property-placeholder location="classpath:db.properties"/>

猜你喜欢

转载自blog.csdn.net/fjd7474/article/details/107722361