Re:Spring 6.1 now compatible with virtual threads and JDK 21...
by ivan_gammel on Wednesday August 16, 2023 @04:23PM
(#37153230)
Spring annotations have runtime scope (one annotation per class is usually sufficient for injection if Spring can resolve all constructor arguments). You can disregard them and wire your POJOs manually via constructors in unit tests. Spring context thus is really required only in integration tests, in unit tests it is optional and may be a code smell (testing too big scope).
[ Parent
| on HN ]
There are no comments on this comment yet.