在 tomcat 7 上成功部署后,我每秒收到警告消息:
org.springframework.web.servlet.PageNotFound handleHttpRequestMethodNotSupported WARNING: Request method 'HEAD' not supported
但是application作品。如何避免这个烦人的消息?
最佳答案
您需要在失败的方法上添加以下 @RequestMapping(method = {RequestMethod.GET, RequestMethod.HEAD})
。这将允许他们处理 HEAD
请求并且应该使警告消失。
关于java - Spring 警告 : Request method 'HEAD' not supported,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28536718/