Skip to Main Content

Is spring @RequestBody support type of a class

2875841Mar 9 2016 — edited Mar 9 2016

Hi All,

I have to execute a method based on different scenario.But the VO passing each time will be different.So how can i configure this in Spring

I have to execute method doSomeAction(@RequestBody SubVOA subVOA)

class mainVO{

//main attributes

}

class subVoA extends mainVO{

//some attributes

}

class subVoB extends mainVO{

//some attributes

}

how itsĀ  possible to configure doSomeAction to accept both subVoA and subVoB. if not any other solution to do this

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Apr 6 2016
Added on Mar 9 2016
4 comments
1,130 views