1. 程式人生 > >nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.pro

nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.pro

問題所在:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.properties]


問題分析:

大概意思就是這個[/jdbc.properties]找不到。


問題解決:

在引入外部檔案時,location加上classpath: