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
Post a Comment