SSM+Maven的JavaWeb項目中的異常的可能性
阿新 • • 發佈:2018-03-01
resource 沒有 als rect 文件中 lte 處理方法 javaweb 出錯
1、404
可能:1):被攔截了,即:springmvc中的controller可能不存在,可能沒有被配置,可能配置出錯
2):資源確實不存在
3):路徑出錯
2、500,程序異常,但是業務邏輯什麽都沒問題
可能:未更新依賴,將更改的項目run as --->maven install
可能導致如下的異常:
1)
處理方法(1):如果在編譯後的文件中沒有mapp.xml文件,試著在pom.xml文件中添加如下代碼;(2):maven Install 後重新運行;
<!-- 如果不添加此節點,mybatis的mapper.xml文件都會被漏掉。 --> <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build>
SSM+Maven的JavaWeb項目中的異常的可能性