Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported] code example
Example 1: thymeleaf Request method 'POST' not supportedorg.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported
spring.mvc.hiddenmethod.filter.enabled=true
Example 2: 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);
}
=> changing for this GET method works fine