Closed
Description
Christopher Smith opened SPR-9132 and commented
The autowire semantics for collection types assume that at least one matching bean will be found to be injected. The new @Configuration
syntax with parameter injection, however, does not have analog to @Autowired
's required=false. Changing to field injection is an inelegant workaround, and it would be cleaner to have an @AllowEmpty
or similar parameter annotation for the new syntax.
Affects: 3.1.1
Issue Links:
- Support for java.util.Optional with @Inject (a la @Autowired's required=false) [SPR-11833] #16452 Support for java.util.Optional with
@Inject
(a la@Autowired
's required=false)
Referenced from: commits 7d22315
4 votes, 6 watchers