Skip to content

Commit b5baab7

Browse files
Move @responsebody to class level, bump version to 0.0.2
1 parent 2041089 commit b5baab7

File tree

2 files changed

+2
-2
lines changed
  • spring-boot-exceptions/pass-exception-to-client-json-spring-boot

2 files changed

+2
-2
lines changed

spring-boot-exceptions/pass-exception-to-client-json-spring-boot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<groupId>com.baeldung</groupId>
1212
<artifactId>pass-exception-to-client-json-spring-boot</artifactId>
13-
<version>0.0.1-SNAPSHOT</version>
13+
<version>0.0.2-SNAPSHOT</version>
1414
<name>pass-exception-to-client-json-spring-boot</name>
1515
<description>Baeldung article code on how to pass exceptions to client in JSON format using Spring Boot</description>
1616

spring-boot-exceptions/pass-exception-to-client-json-spring-boot/src/main/java/com/baeldung/passexceptiontoclientjsonspringboot/ErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import org.springframework.web.bind.annotation.ResponseStatus;
88

99
@ControllerAdvice
10+
@ResponseBody
1011
public class ErrorHandler {
1112

1213
@ExceptionHandler(CustomException.class)
1314
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
14-
@ResponseBody
1515
public CustomException handleCustomException(CustomException ce) {
1616

1717
return ce;

0 commit comments

Comments
 (0)