Closed
Description
Describe the bug
If i add the Validated annotation etc. to the controller, it will become an AOP Proxy class, but the response returned by ExceptionHandler will not be displayed.
To Reproduce
GET /exception
@RestController
@RequestMapping("exception")
@Validated
public class ExceptionController {
@GetMapping
public String index() {
throw new ExampleException();
}
@ExceptionHandler(ExampleException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ApiResponse(responseCode = "400", description = "bad request")
public String customControllerException() {
return "exception1";
}
}
Expected behavior
Actual
"/exception": {
"get": {
...
"responses": {
"200": {
...
},
"400": {
...
}
}
}
}
Expected:
"/exception": {
"get": {
...
"responses": {
"200": {
...
}
}
}
}