publicissapient-france/selma

Support for Spring's @Primary annotation

brenthaertlein opened this issue · 0 comments

If I extend a @Mapper annotated interface with withIoC = IoC.SPRING, and then annotate the extended interface similarly, both are candidates for Autowiring.

Using withIoCServiceName allows me to specify which implementation is used with the @Qualifier annotation, but I feel it would be helpful to designate a generated implementation to have a @Primary annotation on the class (e.g. withIoCPrimary = true maybe?).

Let me know if that's clear enough or if you'd like a code example.