Coding interface with Spring controller method with @RequestMapping
I have a controller with the following method:
@RequestMapping(method = POST)
public ModelAndView emailRegister(EmailParameter parameters, ModelMap model) {}
Where EmailParameter is an interface. My understanding is that Spring is (magically?) Mapping incoming HTTP parameters to fields of my bean by name, and it can't do that since I declared an interface.
Is it okay to declare an interface here if so there is some additional configuration I need?
I don't have extensive programming experience, so I might be wrong about using the interface type here, but I believe this is what I should be doing?
Also, if anyone can explain how Spring maps request parameters to fields in my object, that would be much appreciated. Or a link to where it is explained as I couldn't find it!
thank
+3
source to share