PreAuthorize error handling
Spring Boot docs on error handling: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-error-handling. One way you can control the JSON is by adding a @Bean of type ErrorAttributes. @Bean ErrorAttributes errorAttributes() { return new MyErrorAttributes(); }