Move @ResponseBody to class level, bump version to 0.0.2

This commit is contained in:
Jacob Stopak 2019-04-21 15:22:14 -07:00
parent 2041089e74
commit b5baab7092
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
</parent>
<groupId>com.baeldung</groupId>
<artifactId>pass-exception-to-client-json-spring-boot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
<name>pass-exception-to-client-json-spring-boot</name>
<description>Baeldung article code on how to pass exceptions to client in JSON format using Spring Boot</description>

View File

@ -7,11 +7,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
@ControllerAdvice
@ResponseBody
public class ErrorHandler {
@ExceptionHandler(CustomException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseBody
public CustomException handleCustomException(CustomException ce) {
return ce;