You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sreekanth S. Nair" <sr...@egovernments.org> on 2016/08/07 08:02:57 UTC

Issue in autowiring spring beans from parent context

Recently i tried to move some of the services to spring parent context, we
use spring's *parentContextKey* in web.xml to enable ContextLoaderListener to
pick these services loaded globally. I have struts2 as well as Spring mvc
modules inside an EAR, Spring mvc controller is properly getting injected
with this parent context bean whereas struts2 action classes are not
getting injected with parent context bean. Any idea, if someone can tell me
precisely which classes need to be debugged i can do that too. FYI, i'm
using struts2-spring plugin along with rest and convention plugin.

Re: Issue in autowiring spring beans from parent context

Posted by "Sreekanth S. Nair" <sr...@egovernments.org>.
I could shown little more patience :-) the problem solved, i was missing
context:componentscan missing for my web applicationContext file.


--------------------

On Sun, Aug 7, 2016 at 1:32 PM, Sreekanth S. Nair <
sreekanth.nair@egovernments.org> wrote:

> Recently i tried to move some of the services to spring parent context, we
> use spring's *parentContextKey* in web.xml to enable
>  ContextLoaderListener to pick these services loaded globally. I have
> struts2 as well as Spring mvc modules inside an EAR, Spring mvc controller
> is properly getting injected with this parent context bean whereas struts2
> action classes are not getting injected with parent context bean. Any idea,
> if someone can tell me precisely which classes need to be debugged i can do
> that too. FYI, i'm using struts2-spring plugin along with rest and
> convention plugin.
>