ConstraintViolationException handler isn't executed in Micronaut
问题 I have a ConstraintViolationException handler class that looks like this: @Produces @Singleton @Requires(classes = {ConstraintViolationException.class, ExceptionHandler.class}) public class ConstraintsViolationsExceptionHandler implements ExceptionHandler<ConstraintViolationException, HttpResponse> { @Override public HttpResponse handle(HttpRequest request, ConstraintViolationException exception) { return HttpResponse .status(HttpStatus.FORBIDDEN) .contentType(MediaType.APPLICATION_JSON)