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

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

java - idea提示 org.springframework.web.context.ContextLoaderListener沒找到

瀏覽:106日期:2024-01-23 13:43:55

問題描述

java - idea提示 org.springframework.web.context.ContextLoaderListener沒找到

web.xml

<?xml version='1.0' encoding='UTF-8'?><web-app xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://java.sun.com/xml/ns/javaee' xmlns:web='http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd' xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd' version='2.5'> <display-name>SalamanderBBS</display-name> <!-- 起始歡迎界面 --> <welcome-file-list><welcome-file /> </welcome-file-list> <!-- 讀取spring配置文件 --> <context-param><param-name>contextConfigLocation</param-name><param-value>classpath:spring-mybatis.xml</param-value> </context-param> <!-- 設計路徑變量值 --> <context-param><param-name>webAppRootKey</param-name><param-value>springmvc.root</param-value> </context-param> <!-- Spring字符集過濾器 --> <filter><filter-name>SpringEncodingFilter</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value></init-param><init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value></init-param> </filter> <filter-mapping><filter-name>SpringEncodingFilter</filter-name><url-pattern>/*</url-pattern> </filter-mapping> <listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- springMVC核心配置 --> <servlet><servlet-name>dispatcherServlet</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><init-param> <param-name>contextConfigLocation</param-name> <!--spingMVC的配置路徑 --> <param-value>classpath:spring-mvc.xml</param-value></init-param><load-on-startup>1</load-on-startup> </servlet> <!-- 攔截設置 --> <servlet-mapping><servlet-name>dispatcherServlet</servlet-name><url-pattern>/</url-pattern> </servlet-mapping> <!-- 錯誤跳轉頁面 --> <error-page><!-- 路徑不正確 --><error-code>404</error-code><location>/WEB-INF/view/errpage/404.jsp</location> </error-page> <error-page><!-- 沒有訪問權限,訪問被禁止 --><error-code>405</error-code><location>/WEB-INF/view/errpage/405.jsp</location> </error-page> <error-page><!-- 內部錯誤 --><error-code>500</error-code><location>/WEB-INF/view/errpage/500.jsp</location> </error-page></web-app>

項目結構:

java - idea提示 org.springframework.web.context.ContextLoaderListener沒找到

問題解答

回答1:

解決了:File > Project Structure > Artifacts > 在右側Output Layout右擊項目名,選擇Put into Output Root,見下面截圖:

java - idea提示 org.springframework.web.context.ContextLoaderListener沒找到

標簽: java
相關文章:
主站蜘蛛池模板: 新巴尔虎左旗| 亳州市| 馆陶县| 大方县| 宜丰县| 陆川县| 云安县| 泽库县| 平利县| 海兴县| 阜新| 松溪县| 杂多县| 札达县| 伽师县| 铁岭市| 丹凤县| 浏阳市| 荃湾区| 灵武市| 古交市| 嘉禾县| 政和县| 崇明县| 施秉县| 广东省| 恩平市| 丰镇市| 岐山县| 稷山县| 刚察县| 东乡县| 乌鲁木齐县| 和田市| 海阳市| 马尔康县| 邵武市| 河南省| 商丘市| 常宁市| 宁晋县|