Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.6
-
None
Description
I have some Spring services that take injected components, and I use constructor injection whenever possible. These services can't be reconfigured after startup, and usually make the fields final.
I would like to be able to use @Immutable to automatically generate the constructors and related plumbing for me, but @Immutable creates two, one that takes a Map and one that takes regular arguments. Spring/CDI can't resolve a single constructor and won't inject.
Would it be feasible to have a way to add an annotation like @Inject to the generated tuple constructor, or is there another way that I can make an @Immutable class eligible for injection?