Has the custom annotation been declared with @Retention(RetentionPolicy.RUNTIME)? Any other specifics that possibly makes it different from the annotations that come with Spring? Does it work for you with a custom stereotype: e.g. an @AdminController annotation that is meta-annotated with @Controller, binding the advice to AdminController.class?
Simon Oelerich opened SPR-16964 and commented
Creating an ControllerAdvice with assignableTypes works fine.
Custom annotations are not recognized as follows:
With this type of ControllerAdvice the AdminController will not use the advice.
The following is working fine as a workaround:
Affects: 5.0.6, 5.0.7
The text was updated successfully, but these errors were encountered: