Unable to register @RestControllerAdvice Class via WebTestClient [SPR-16520] #21063
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
kabubu opened SPR-16520 and commented
Given rest controller:
controlleradvice code:
and test:
Despite invoking controllerAdvice() method on WebTestClient an
@ExceptionHandler
located on ControllerAdvice doesnt work and test ends with " No content< 500 Internal Server Error < Content-Type: [application/json;charset=UTF-8]
Content not available yet"
If we put
@ExceptionHandler
in@RestController
body everything works fine.Affects: 5.0.4
Referenced from: commits bb8cddd, 01d9475
The text was updated successfully, but these errors were encountered: