When i use "Delegate Struts Action management to Spring" approach explained in http://www.ibm.com/developerworks/java/library/j-sr2.html#N101B7 things work fine in terms of functionality but findbugs reports following voilation Dodgy - Class开发者_如何学C extends Struts Action class and uses instance variables:MTIA
I have bean dependencies injected into action class through spring .
Please help me and suggest me a cleaner way to solve this problem.
Thanks
This is just an misunderstanding with findbugs. FindBugs sees the injector setter methods and assumes that these can be called during the normal flow of the action. If that were the case, then the action would be problematic. However since these methods are only used at startup, it's not an issue. You can exclude this warnings from FindBugs if they are bothering you.
精彩评论