Testing injected dependencies into your struts2 actions

Posted by Barry on Stack Overflow See other posts from Stack Overflow or by Barry
Published on 2010-03-12T20:23:39Z Indexed on 2010/03/12 20:27 UTC
Read the original article Hit count: 506

Filed under:
|
|

Hi,

I am wondering how others might have accomplished this. I found in the Spring documentation @required which I attempted to use in a 'test' but got this stmt INFO XmlConfigurationProvider:380 - Unable to verify action class [xxx] exists at initialization

I have found another way in spring to do this is to write custom init methods and declare those on the bean but it almost seems like this is a strange thing to do to a struts2 action.

In my application I inject through spring different web services (via setter injection) into different actions. I want to ensure on startup these are not null and set.

© Stack Overflow or respective owner

Related posts about struts2

Related posts about spring