You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But since we do not use @Inject@Mapper SavingsAccountMapper this mapper is not initialized. We can force this initialization by adding this field but we do not need this.
So my question/issue is. Is is possible to inject a list of Mybatis Mappers without the need to inject them in fields individually?
Thanks,
Sander
The text was updated successfully, but these errors were encountered:
mybatis-cdi only recognize Mappers injected with @mapped at least once. So
if you have a mapper but you do not inject it with @Mapper somewhere...
mybatis-cdi will ignore it.
Okay that's what I figured :)
By the way I just found out it wouldn't work anyway as Mybatis does not accept a default implementation in the interface and will throw an Exception. Too bad.
Hi there,
We use mybatis-cdi in combination with java8. With the default implementation now possible in interfaces this makes code like this possible.
So we inject a list of Mappers of type ItemMapper and each mapper can say for which type it can be used. For example:
But since we do not use @Inject @Mapper SavingsAccountMapper this mapper is not initialized. We can force this initialization by adding this field but we do not need this.
So my question/issue is. Is is possible to inject a list of Mybatis Mappers without the need to inject them in fields individually?
Thanks,
Sander
The text was updated successfully, but these errors were encountered: