Spring MVC abstract class binding
问题 Assume I have classes: abstract class Animal {} class Elephant extends Animal { Trunk trunk; RightEar rightEar; } class Peacock extends Animal { Tail tail; Beak beak; } And I want to write single controller method, which will have parameter of type Animal : @RequestMapping("/animal") public ModelAndView animalsHandler(@ModelAttribute("animal") Animal animal) {...} I found that for non-complex parameter it could be done by choosing appropriate propertyEditor in @InitBinder method, i.e. it will