spring mvc - Cannot pass @SortDefault Sort object into controller method? -


it stated in documentation of @sortdefault

annotation define default sort options used when injecting sort instance controller handler method.

but fact is, got exception:

failed instantiate [org.springframework.data.domain.sort]: no default constructor found; nested exception java.lang.nosuchmethodexception: org.springframework.data.domain.sort.()

did miss here?

void download(webrequest request, httpsession session,       @requestparam(value = "fields",           defaultvalue = "id,hostname,networkid,customerid") string[] visibleproperties,       @sortdefault("hostname") sort sort, httpservletresponse response) { } 

you missed @enablespringdatawebsupport in configuration.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -