-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
I just want to share an idea... I think it would be great to be able to add any annotations you want to generated classes/methods.
Something like this:
@Annotated({
@Component,
@Qualifier("fooMapper")
})
@Mapper
public interface FooMapper {
@Annotated({
@Cacheable(value = "cache", key = "mappedFoo #foo.id" )
})
Foo map(Foo foo);
}
So, the content of @Annotated would be added to generated code like this:
@Component,
@Qualifier("fooMapper")
public class FooMapperImpl implements FooMapper {
@Cacheable(value = "cache", key = "mappedFoo #foo.id" )
Foo map(Foo foo) {
...
}
}
With this functionality we wouldn't need @Mapper(componentModel = "spring") for example, and many annotation-based issues would gone.
xqdd, MartinWeise, mbrem, famod, mickroll and 9 more