Can @Inject be made option in JSR 330 (like @Autowire(required=false)?
- by Eric B.
Spring's @Autowire can be configured such that Spring will throw an error if no matching autowire candidates are found: @Autowire(required=false)
Is there an equivalent JSR-330 annotation? @Inject always fails if there is no matching candidate. Is there any way I can use @Inject but not have the framework fail if no matching types are found? I haven't been able to find any documentation to that extent.