Announcement Announcement Module
Collapse
No announcement yet.
autowire for struts action Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • autowire for struts action

    When use DelegatingRequestProcessor to get the action bean instance from app context, I think that there might be a cleaner usager for the user, since it is recommeded that the type class will be definded even not used, why we can not make use of it, so if the action bean is not defined in spring, DelegatingRequestProcessor can create the action according to its type and autowire the properties required. That way, the action developer will have no more extra work than a normal action.

  • #2
    Yes, I've also used autowire by type for Struts actions successfully in the past, via a base action. It works well unless you have a complex requirement. (But typically web layer to business layer dependencies are expressed fairly simply.)

    Comment


    • #3
      How did you approach the auto-wiring in the base action. I am looking to do something similar w/o having to maintain 2 config files.

      Comment

      Working...
      X