@ExceptionHandler
@ResponseStatus(HttpStatus.BAD_REQUEST)
public void handle(HttpMessageNotReadableException e) {
logger.warn("Returning HTTP 400 Bad Request", e);
}
More Related Contents:
- How to avoid the “Circular view path” exception with Spring MVC test
- Using Spring MVC Test to unit test multipart POST request
- This application has no explicit mapping for /error
- Spring Hibernate – Could not obtain transaction-synchronized Session for current thread
- Spring Boot Security CORS
- No mapping found for HTTP request with URI [/WEB-INF/pages/apiForm.jsp] [duplicate]
- Handle spring security authentication exceptions with @ExceptionHandler
- Spring @Transactional not working
- File Upload with Angular2 to REST API
- Spring: namespace vs contextConfigLocation init parameters in web.xml
- Bean injection inside a JPA @Entity
- How to get access to HTTP header information in Spring MVC REST controller?
- Spring Security configuration: HTTP 403 error
- Where is the @Autowired annotation supposed to go – on the property or the method?
- how to capture multiple parameters using @RequestParam using spring mvc?
- @Autowired in static classes
- How to show all controllers and mappings in a view
- JPA / JTA / @Transactional Spring annotation
- How to Log HttpRequest and HttpResponse in a file?
- How to validate Spring MVC @PathVariable values?
- The request sent by the client was syntactically incorrect.-Spring MVC + JDBC Template
- What are the differences between Model, ModelMap, and ModelAndView?
- Set default page size for JPA Pageable Object
- How to use with an tag?
- Spring MultipartFile validation and conversion
- Spring Entities should convert to Dto in service?
- Spring HandlerMethodArgumentResolver not executing
- Adding custom RequestCondition’s in Spring mvc 3.1
- Why is an excerpt projection not applied automatically for a Spring Data REST item resource?
- Configure spring boot to redirect 404 to a single page app [duplicate]