[
https://issues.apache.org/jira/browse/WICKET-5686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov reassigned WICKET-5686:
---------------------------------------
Assignee: Martin Grigorov
> @Inject should require the bean dependency instead of setting null
> ------------------------------------------------------------------
>
> Key: WICKET-5686
> URL: https://issues.apache.org/jira/browse/WICKET-5686
> Project: Wicket
> Issue Type: Bug
> Components: wicket-spring
> Affects Versions: 6.16.0
> Environment: Spring 4.0.6
> Reporter: Anton Kurniawan
> Assignee: Martin Grigorov
>
> When using {{@SpringBean}}, if the bean cannot be injected then Wicket will
> throw {{Exception}}.
> However current behavior if when using {{@Inject}} inside component, the
> field will be left as null. This is inconsistent behavior with what CDI spec
> and how the "real" Spring does it.
> Wicket should change its behavior so that {{@Inject}} is always required. If
> the dependency is optional the user can use {{@SpringBean(required=false)}}
> as always.
--
This message was sent by Atlassian JIRA
(v6.2#6252)