I have a controller which has an interface as proxy
@Controller
public class MyController implements IMyController{
public FormBean getCommand(){
return new FormBean();
}
public String onLoad(HttpServletRequest req,HttpServletResponse res){
}
}
The interface as follows:
public interface IMyController {
@ModelAttribute("formBean")
FormBean getCommand();
@RequestMapping("/onload.do")
String onLoad(HttpServletRequest req,HttpServletResponse res);
}
Problem is, the getCommand() method doesn't get called anytime. I have also tried by moving the modelattribute annotation to the implementation class but to no avail.
Where am I going wrong?