Skip to content

Support for java.util.Optional with @Inject (a la @Autowired's required=false) [SPR-11833] #16452

Closed
@spring-projects-issues

Description

@spring-projects-issues

Juergen Hoeller opened SPR-11833 and commented

Java 8's java.util.Optional is a new common type to mark references as non-required. It'd be nice to support this with @Inject at the injection point level, as an alternative to @Autowired's required=false attribute.


Issue Links:

Referenced from: commits 5cb3f8e, 7d03daf

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions