Answers for "Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]"

0

thymeleaf Request method 'POST' not supportedorg.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported

// FOR DELETE METHODS THIS CONFIG MAY BE NECESSARY IN YOUR app.properties:

spring.mvc.hiddenmethod.filter.enabled=true
Posted by: Guest on October-26-2020
0

Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported] on @DeleteMapping

@RequestMapping(value="/empdelete/{id}", method=RequestMethod.DELETE)
public void deleteEmployee( PathVariable(“id”) Long id) {
    collaborateurRepository.deleteById(id);
}
//method={RequestMethod.DELETE, RequestMethod.GET}
=> changing for this GET method works fine
Posted by: Guest on February-28-2021

Code answers related to "Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language