Extra property is returned when using jsonview in Spring mvc4 -
i using spring mvc(4.x) , met strange problem:
@requestmapping("/xx") class controller{ @requestmapping(produce="application/json") public resource list(@requestparameter string key, @requestparameter page page){ arraylist list=..... return new resource(list,page); } } class page{ int page; int size; ... } class resource<t>{ private list<t> list; private page page; //getter , setter omitted }
once call:
http://.../xx/?key=key&page=1&size=10
i got json result,however looks this:
{ page:... resource:{ list:... page:... } }
i wonder why page
property @ root returned?
Comments
Post a Comment