Move @ResponseBody to class level, bump version to 0.0.2
This commit is contained in:
parent
2041089e74
commit
b5baab7092
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue