Spring MVC中Controller返回值void時報錯


Controller如下:

當使用url訪問該處理器方法時,報錯如下:

26-Jan-2019 21:16:28.105 警告 [http-nio-8080-exec-39] org.springframework.web.servlet.PageNotFound.noHandlerFound No mapping found for HTTP request with URI [/BudgetManagementSystem/Crawler/Crawler/Workstation] in DispatcherServlet with name 'Dispatcher'

原因是處理器方法沒有設置HttpServletResponse參數。

為什么必須設置這個參數?


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM