久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

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

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

瀏覽:152日期: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
主站蜘蛛池模板: 太仆寺旗| 文登市| 曲水县| 波密县| 双江| 马龙县| 皮山县| 重庆市| 常宁市| 苏尼特左旗| 丽江市| 睢宁县| 曲松县| 滦南县| 石首市| 长武县| 抚顺县| 保康县| 广元市| 康马县| 泽库县| 新疆| 晋城| 建德市| 德惠市| 鄂尔多斯市| 长汀县| 蒙山县| 济源市| 湖南省| 蒙阴县| 牙克石市| 兴隆县| 阿图什市| 水城县| 靖江市| 皮山县| 嘉兴市| 象州县| 勐海县| 宝山区|