java - Spring - 405 Http method DELETE is not supported by this URL -


OK, I have a strange problem with performing a "default" HTTP request in Spring.

I have a controlling method in which I mapped a DELETE request:

  @RequestMapping (value = "/ {authorizationUrl}", method = DELETE) public Zero deletion authority server (@RequestHeader) (value = "authorization") thrust authorization, @ PathWarible ("Authorization URL") string authorization URL) IOException {System.out.println ("test") throws; }  

The controller is mapped using @RequestMapping ("/ authorization_servers"); When I send a request through my DEV HTTP client, I get the answer: 405 Http method DELETE is not supported by this URL .

The request looks like this:

  Delete localhost: 8080 / authorization_servers / asxas Header: Authorization: "Test: "  

If someone can consider it and can help me, I would be grateful

This will work:

  @RequestMapping (value = "/ {authorizationUrl}", method = DELETE) public @ResponseBody invalid DeleteAuthorizationServer (@RequestHeader) string authentication, @ PathWarible ("authorizationUrl") string authorization url {System.out.printf ("test: you tried% s to use% s, \ n ", Authorization url, authorization); }  

You did not remember the Response Body; Your method was actually calling; What happened after that was generating the error code.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -