Sure.

I use annotations, i. e.:

@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class EmptyAction extends AbstractAction {

(AbstractAction  extends ActionSupport)

In applicationContext:

<beans ... default-autowire="byType">
<context:component-scan base-package="de.grobmeier..."
annotation-config="true" />

I have used my own stack with:

-<interceptor-ref name="i18n"/>

The action config is still xml. like:

<action name="myname" class="de.grobmeier....EmptyAction">
<result>/jsp/mysite.jsp</result>
</action>

It worked with 2.5.1, but no more with 2.5.10.1.
Spring version is 4.1.6.RELEASE

Thanks Lukasz!

Christian


On Mon, Mar 13, 2017, at 16:12, Lukasz Lenart wrote:
> 2017-03-13 16:02 GMT+01:00 Christian Grobmeier <grobme...@apache.org>:
> > Hello all,
> >
> > I trying to upgrade my Struts app from 2.5.1 to 2.5.10.1.
> >
> > I saw there are some changes in I18nInterceptor like that:
> > https://github.com/apache/struts/commit/ea92e95461386f1ddfda37bb09ec170b8e306ae7#diff-f9eff9d34d35d47f349c7fa0531e51bdR130
> >
> > My actions extend from ActionSupport, which is implementing
> > LocaleProvider.
> > I am also using Spring for DI.
> >
> > Unfortunately I now get this exception when starting the container:
> >
> >  SpringObjectFactory            - Error building bean
> > org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> > creating bean with name
> > 'org.apache.struts2.interceptor.I18nInterceptor': Unsatisfied dependency
> > expressed through bean property 'localeProvider': : No qualifying bean
> > of type [com.opensymphony.xwork2.LocaleProvider] is defined: expected
> > single matching bean but found 95: emptyAction, ...
> >
> > It lists all my actions and it seems as Spring would try to instantiate
> > I18nInterceptor after my actions.
> >
> > Does anybody else experience that or got an idea how to improve my code?
> 
> This is strange, can you share how did you setup your actions in
> struts.xml?
> 
> 
> Regards
> -- 
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to