Spring Bean配置xml文件确实在IteliJ Idea中加载了负载

时间:2016-12-13 16:10:33

标签: java spring spring-mvc

我正在尝试从InteliJ中的类路径加载一个spring bean爆燃文件。但它没有加载。它显示了一个例外。 InteliJ screen shot

Connected to server
[2016-12-13 09:58:50,515] Artifact eeducation:war exploded: Artifact is being deployed, please wait...
13-Dec-2016 21:58:54.181 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Dec-2016 21:58:54.290 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
13-Dec-2016 21:58:54.611 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Tue Dec 13 21:58:54 ALMT 2016]; root of context hierarchy
13-Dec-2016 21:58:54.721 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [com/habibur/app/config/dao-config.xml]
13-Dec-2016 21:58:54.721 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
 org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [com/habibur/app/config/dao-config.xml]; nested exception is java.io.FileNotFoundException: class path resource [com/habibur/app/config/dao-config.xml] cannot be opened because it does not exist
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:344)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
    at 

1 个答案:

答案 0 :(得分:0)

这个配置文件不应该在你的资源文件夹下吗?