refactor!: 限制 PagingAndSortingQueryParams 中用于排序的字段名称的长度,允许包含短横(-)
This commit is contained in:
@@ -50,7 +50,7 @@ public class PagingAndSortingQueryParams {
|
||||
private Long pageNum;
|
||||
private List<String> orderBy;
|
||||
|
||||
private static final Pattern SORT_STR_PATTERN = Pattern.compile("^[a-zA-Z]\\w+-(desc|asc|DESC|ASC)$");
|
||||
private static final Pattern SORT_STR_PATTERN = Pattern.compile("^[a-zA-Z][\\w-]{0,63}-(desc|asc|DESC|ASC)$");
|
||||
|
||||
private final Map<String, String> sortableProperties;
|
||||
|
||||
|
Reference in New Issue
Block a user