Before the client needs to look at the data in a different sort order according to the requirements, sort by a convention, such as 1 for Time ascending, 2 for Time Descending, 3, 4 for this form, and then background to create sort objects based on these values.
Later found completely superfluous, can be based on a specific way, directly in the controller layer to get to the sort object, such as the client call Localhost:8080/user/blogs? Sort=createddate,desc, the controller layer can do this:
Public String List (@SortDefault sort sort) {}
@SortDefault can set the default sort field and default direction.
Sorting can also be a number of ways, such as Sort=createddate,desc&sort=name,desc can even sort=-createddate, where-in order to indicate the sort by desc, do not write this-default by ACS
Spring MVC passes the value of the client and the controller gets the sort object