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
I think it would be very useful to have support for Java CDI standard injection mechanism based on javax.inject.Inject annotation. Additionally, it would be great to have the ability to create singletons based on javax.inject.Singleton annotation too. My proposal is to incorporate to the Selma's @Mapper annotation the follow options for the existing withIoC attribute :
CDI: This would add the javax.inject.Named annotation to the generated mapper class.
CDI_SINGLETON: This would add the javax.inject.Named and javax.inject.Singleton annotations to the generated mapper class.
The result would be that later on that we would be able to do the following in our code:
@InjectprivatefinalUserMapperuserMapper;
I've found this implementation to incorporate CDI to Selma, but I don't think it's compatible with the aforementioned request.
Thank you!
The text was updated successfully, but these errors were encountered:
this is possible you can simply modify the implementation found to do it and add the support for withIoCServiceName parameter inside the code for CDI support.
I would be pleased to merge such a pull request with the corresponding tests.
Musikolo
added a commit
to Musikolo/selma
that referenced
this issue
Jan 18, 2017
Hi,
I think it would be very useful to have support for Java CDI standard injection mechanism based on
javax.inject.Inject
annotation. Additionally, it would be great to have the ability to create singletons based onjavax.inject.Singleton
annotation too. My proposal is to incorporate to the Selma's@Mapper
annotation the follow options for the existingwithIoC
attribute :CDI
: This would add thejavax.inject.Named
annotation to the generated mapper class.CDI_SINGLETON
: This would add thejavax.inject.Named
andjavax.inject.Singleton
annotations to the generated mapper class.The result would be that later on that we would be able to do the following in our code:
I've found this implementation to incorporate CDI to Selma, but I don't think it's compatible with the aforementioned request.
Thank you!
The text was updated successfully, but these errors were encountered: