refactor!: 重构 PagingAndSortingQueryParams
#69
Reference in New Issue
Block a user
No description provided.
Delete Branch "zhouxy108/plusone-commons:refactor/paging-and-sorting-query-params"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
将构建
PagingParams的过程放在PagingParamsBuilder中。当定义一个
PagingAndSortingQueryParams的子类时,该类应包含一个静态的
PagingParamsBuilder单例对象,使对
sortableProperties的校验逻辑在类加载时执行。原来的实现方式是将校验
sortableProperties的逻辑放在PagingAndSortingQueryParams的构造方法中,每创建一个对象就得执行一次,造成不必要的浪费。