hugoloza / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
0 stars 0 forks source link

Cannot raise spring application context in case another bean of type java.lang.String presents in the same context. #370

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
in class com.gwtplatform.dispatch.server.spring.DispatchServiceImpl

on 
  @Autowired(required = false)
  protected String securityCookieName;

a name qualifier should be added because in opposite case it wired by bean type 
(java.lang.String) and if application context contains at least one bean  of 
the same type, application fails due to

org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean 
of type [java.lang.String] is defined: expected single matching bean but found 
2: [anotherStringBean, getSecurityCookieName]

Original issue reported on code.google.com by paul.jak...@viaden.com on 27 Sep 2011 at 9:07

GoogleCodeExporter commented 9 years ago
I'd really welcome a patch by a spring user.

Original comment by philippe.beaudoin on 27 Sep 2011 at 1:38

GoogleCodeExporter commented 9 years ago
To solve that problem you can add unique @Qualifier annotation to the 
securityCookieName field in the DispatchServiceImpl class.

Original comment by marcin.tatarski on 25 Jan 2012 at 1:24

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 1 Feb 2012 at 6:52

GoogleCodeExporter commented 9 years ago
Marcin, Paul, can I close this issue?

Original comment by philippe.beaudoin on 2 Feb 2012 at 5:36