From d34634a18b303c714ca9db4a14bb88d9722b83a2 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Thu, 3 Apr 2025 09:01:11 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=99=90=E5=88=B6=20PagingAndSortingQu?= =?UTF-8?q?eryParams=20=E4=B8=AD=E7=94=A8=E4=BA=8E=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0=E7=9A=84=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=EF=BC=8C=E5=85=81=E8=AE=B8=E5=8C=85=E5=90=AB=E7=9F=AD?= =?UTF-8?q?=E6=A8=AA=EF=BC=88-=EF=BC=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/commons/model/dto/PagingAndSortingQueryParams.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PagingAndSortingQueryParams.java b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PagingAndSortingQueryParams.java index 71e36af..0c64f2a 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PagingAndSortingQueryParams.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PagingAndSortingQueryParams.java @@ -50,7 +50,7 @@ public class PagingAndSortingQueryParams { private Long pageNum; private List 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 sortableProperties;