運用SSM框架所遇到的bug及解決方法

  1. 後臺沒有錯誤,前臺控制器報錯:Uncaught TypeError: window.location.href is not a function
  • 修改:把window.location.href(url)改成window.location=(url)
  1. 前臺控制檯報 500 (Internal Server Error)
    在這裏插入圖片描述
    措施:
    (1)點擊上圖錯誤路徑跳轉到Network,點擊XHR,可以看到具體錯誤
    在這裏插入圖片描述
    (2)點擊錯誤,之後點擊Priview,可以看到具體的出錯信息,然後再根據錯誤信息進行修改即可。
    在這裏插入圖片描述
  2. 控制檯報錯: Name for argument type [java.lang.Integer] not available, and parameter name information not found in class file either.
  • 報錯信息意思是:前臺參數和後臺參數不一致
  • 措施:查看代碼,修改參數,使其一致後,如果還頻繁報錯,可以採取把項目clean一下,服務器移除項目,重新運行項目。
  1. 服務器報錯:publishing to tomcat v8.0 server at localhost has encontered a problem
    錯誤原因:Could not publish to the server. java.lang.NullPointerException
    修改:將項目clean一下,並且在服務器端移除項目,重新運行項目
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章