struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonius Ng (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3257) Get Controller bean from Spring
Date Wed, 23 Sep 2009 02:02:48 GMT
Get Controller bean from Spring
-------------------------------

                 Key: WW-3257
                 URL: https://issues.apache.org/struts/browse/WW-3257
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - REST, Plugin - Spring
    Affects Versions: 2.1.6
            Reporter: Antonius Ng
            Priority: Minor


Because of the automatic configuration of actions, when using StrutsSpringObjectFactory, the
Controller objects are not created by Spring, thus the dependencies of the Controller are
not injected.

The workaround that I did was to write a new Class that extends StrutsSpringObjectFactory
and override the method buildBean(Class clazz, Map<String, Object> extraContext) to
get the Controller bean from appContext if the clazz is the Controller class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message