[ 
https://issues.apache.org/jira/browse/WICKET-7170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hans Schäfer updated WICKET-7170:
---------------------------------
    Description: 
Spring considers the defaultCandidate-Flag, supplementary to the 
autowireCandidate-Flag. This ist currently not supported by SpringInjector / 
AnnotProxyFieldValueFactory.

Assume 2 Beans of the same Class / Type: one is autowiredCandidate=true / 
defaultCandidate=true, the second is autowireCandidate=true but 
defaultCandidate = false.

Spring always chosses the first one for autowiring, if no explicit beanName is 
given.

Wicket complains about 2 beans of same type.

Spring had a similar issue when creating proxies for beans with 
defaultCandidate = false:

[https://github.com/spring-projects/spring-framework/issues/35626]

There is a Pull Request that fixes this issue: 
[https://github.com/apache/wicket/pull/1310]

 

  was:
Spring considers the defaultCandidate-Flag, supplementary to the 
autowireCandidate-Flag. This ist currently not supported by SpringInjector / 
AnnotProxyFieldValueFactory.

Assume 2 Beans of the same Class / Type: one is autowiredCandidate=true / 
defaultCandidate=true, the second is autowireCandidate=true but 
defaultCandidate = false.

Spring always chosses the first one for autowiring, if no explicit beanName is 
given.

Wicket complains about 2 beans of same type.

Spring had a similar issue when creating proxies for beans with 
defaultCandidate = false:

[https://github.com/spring-projects/spring-framework/issues/35626]


> SpringInjector / AnnotProxyFieldValueFactory does not consider 
> defaultCandidate
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-7170
>                 URL: https://issues.apache.org/jira/browse/WICKET-7170
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-spring
>    Affects Versions: 10.7.0
>            Reporter: Hans Schäfer
>            Priority: Major
>
> Spring considers the defaultCandidate-Flag, supplementary to the 
> autowireCandidate-Flag. This ist currently not supported by SpringInjector / 
> AnnotProxyFieldValueFactory.
> Assume 2 Beans of the same Class / Type: one is autowiredCandidate=true / 
> defaultCandidate=true, the second is autowireCandidate=true but 
> defaultCandidate = false.
> Spring always chosses the first one for autowiring, if no explicit beanName 
> is given.
> Wicket complains about 2 beans of same type.
> Spring had a similar issue when creating proxies for beans with 
> defaultCandidate = false:
> [https://github.com/spring-projects/spring-framework/issues/35626]
> There is a Pull Request that fixes this issue: 
> [https://github.com/apache/wicket/pull/1310]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to