I am using Axon Framework, where I can annotate my domain classes with @Aggregate (which is meta-annotated with @Component from Spring). Then I have to apologize for every private method/field I have by marking them final explicitly.
I think in my case I am good with just marking the class open, so I would like to do it manually while excluding @Aggregate from the spring plugin but I can't find a way to do so.
workaround
According to the documentation, the
springplugin usesall-openunder the hood by just listing Spring annotations, while supporting the meta-annotating. So, we do exactly that, but we don't specify list@Component, so in our code, we must use the stereotypes (repository, service, etc.). This way it doesn't pick up the@Aggregate: