I’m overriding a method that belongs to super class. Method takes no parameter. Therefore, I’m unable to pass Objects to the View using Model. Anyone has any suggestion?
@Override
protected String connectView(){
// I'd like to include an object in Model here
// e.g. model.addAttribute(....)
// but unpossible because super does not take a Model as param
return "connect/status";
}
This should suit your needs, using a
HandlerInterceptor, a custom annotation@Modeland reflection.Model.java
RequestInterceptor.java
applicationContext.xml
YourController.java