We are using Struts 2 + Spring 4 and we want to setup the spring to manage our struts 2 actions.
The spring beans are defined by annotations.
The struts actions are located with convention plugin, so we do not have any actions in the struts.xml
files.
The actions are as below:
//It is located in action folder so it will be located by convention plugin
package foo.bar.actions.usermanager
@Named //This will be used by Spring to located and manage this Bean
public class EditUser(){
@Action(className="editUser") // Should I defined class name here ?!
public String execute() {
}
}
The above code works. But I looking to find if there are better ways, so we can omit the className (which is exactly camel conversion of action name)
Is it possible?!