Hi,

I have interfaces for my domain objects because I need to have different implementations. However, I have a form whose modelAttribute is an implemented domain object.

My problem is that in the Controller when I call:

Code:
	@RequestMapping(method = RequestMethod.POST)
	public ModelAndView processSubmit(
			@ModelAttribute("myObject") IObject interface,
			HttpServletRequest request) throws Exception {}
I get the error where Spring cannot instantiate an interface. At this point in the controller I don't know what implementation is being passed in. Which is why I wanted to have the interface as the parameter. Can someone please help with this. I do not want to several controllers, I just want one controller and separate forms that can have different implementations of the domain object as the modelAttribute.

Thank you