java - eclipse run on server, classpath, not find springmvc.xml
PHP中文网
PHP中文网 2017-05-17 10:00:57
0
2
1111

eclipse:Neon

tomcat:9

When learning SpringMVC, eclipse creates dynamic web projects
Create config (source folder) and src peers
Create the configuration file springmvc.xml in the config directory and load it in web.xml

Project run as-》run configuration

Error report:
Type Exception Report

Message Servlet.init() for servlet [springmvc] threw exception

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [sprigmvc.xml]; nested exception is java.io.FileNotFoundException: class path resource [sprigmvc.xml] cannot be opened because it does not exist

run as -》run configuration
Configure classpath, add project
still report that springmvc.xml in classpath cannot be found
Caused by: java.io.FileNotFoundException : class path resource [sprigmvc.xml] cannot be opened because it does not exist

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
滿天的星座

The path to springmvc.xml is wrong, resulting in the xml file being unable to be found and reading failing

習慣沉默

Solved because the environment variable classpath is not set
.;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jar

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template