Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring WARNING: Request method 'HEAD' not supported

I receive warning message per second after successful deployment on tomcat 7:

org.springframework.web.servlet.PageNotFound handleHttpRequestMethodNotSupported WARNING: Request method 'HEAD' not supported

but application works. How to avoid this annoying message?

like image 297
Nikolas Avatar asked Feb 16 '15 07:02

Nikolas


2 Answers

You would need to add the following @RequestMapping(method = {RequestMethod.GET, RequestMethod.HEAD}) on your methods which are failing. This will allow them to handle HEAD requests and should make the warning go away.

like image 63
npinti Avatar answered Nov 16 '22 01:11

npinti


This is a bug of IntelliJ IDEA

>> see issue

it will be fix in next release and until that there is a patch was created by them Download link

Close idea and Replace bellow file with downloaded one(before do that keep backup of the original file)

<idea home>/plugins/JavaEE/lib/javaee-impl.jar

like image 20
Alupotha Avatar answered Nov 16 '22 01:11

Alupotha