[
https://issues.apache.org/jira/browse/WICKET-5696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emond Papegaaij closed WICKET-5696.
-----------------------------------
Resolution: Invalid
It seems the problem was partly caused by misconfiguration of our application.
For others facing this issue:
Fields injected by spring (on a true spring-bean) can use
@Autowired(required=false) to disable spring injection.
Fields injected by wicket-spring (on components) can use
@SpringBean(required=false) to disable spring injection.
> @SpringBean(required=false) is no longer respected if @Inject is present
> ------------------------------------------------------------------------
>
> Key: WICKET-5696
> URL: https://issues.apache.org/jira/browse/WICKET-5696
> Project: Wicket
> Issue Type: Bug
> Components: wicket-spring
> Affects Versions: 7.0.0-M3, 6.17.0
> Reporter: Emond Papegaaij
> Assignee: Emond Papegaaij
>
> The change made with WICKET-5686 makes it impossible to inject CDI beans in
> an application where Spring and CDI are combined. CDI requires @Inject, but
> this now makes the bean required for Spring, even if
> @SpringBean(required=false) is specified. However, as the bean is injected by
> CDI, Spring does not know it, triggering an exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)