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参数。

为什么必须设置这个参数?

猜你喜欢

转载自www.cnblogs.com/darknessplus/p/10324960.html