Closed
Description
When you register a Reconciler
, and the Reconciler
has the @ControllerConfiguration
on a superclass, an error will be thrown:
myOperator.register(new MyReconciler());
class MyReconciler extends MySuper { }
@ControllerConfiguration
class MySuper implements Reconciler<MyResource> {}
This is the code that throws the exception (AnnotationControllerConfiguration.java
):
this.annotation = reconciler.getClass().getAnnotation(ControllerConfiguration.class);
if (annotation == null) {
throw new OperatorException(
"Missing mandatory @" + ControllerConfiguration.class.getSimpleName() +
" annotation for reconciler: " + reconciler);
}
Solution is to add @Inherited
to @ControllerConfiguration
.
I'd be willing to contribute this change, if this is an acceptable enhancement.
Reason why this is needed in my case
I'm using micronaut framework. And when I inject my reconciler, I actually inject a proxy class that is a subclass of my Reconciler implementation (because I'm using micronaut AOP).