国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

java - eclipse run on server, classpath, not find springmvc.xml

瀏覽:154日期:2023-12-12 09:06:40

問題描述

eclipse:Neon

tomcat:9

在學習SpringMVC時,eclipse創建動態web項目 創建config(source folder)和src同級 在config目錄下創建配置文件springmvc.xml,并在web.xml中加載java - eclipse run on server, classpath, not find springmvc.xml

項目run as-》run configurationjava - eclipse run on server, classpath, not find springmvc.xml報錯: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配置classpath,添加projectjava - eclipse run on server, classpath, not find springmvc.xml還是報找不到springmvc.xml in classpathCaused by: java.io.FileNotFoundException: class path resource [sprigmvc.xml] cannot be opened because it does not existjava - eclipse run on server, classpath, not find springmvc.xml

問題解答

回答1:

springmvc.xml路徑錯了,導致無法找到xml文件,讀取失敗

回答2:

解決了,因為沒有設置環境變量classpath.;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jar

標簽: java
主站蜘蛛池模板: 颍上县| 黄石市| 资源县| 余干县| 塘沽区| 扶风县| 佛山市| 澄城县| 右玉县| 平阴县| 五原县| 铅山县| 博客| 扶风县| 湟中县| 金昌市| 巴马| 天峻县| 青川县| 临朐县| 尚志市| 尼玛县| 垦利县| 虹口区| 江油市| 扶风县| 江油市| 陆河县| 巴青县| 中方县| 东安县| 百色市| 台前县| 九寨沟县| 全州县| 博兴县| 宜兰县| 云南省| 江阴市| 新安县| 玛曲县|