diff --git a/example/example-app/example-app-cmd-domain/pom.xml b/example/example-app/example-app-cmd-domain/pom.xml index 3719bb1b..c370028c 100644 --- a/example/example-app/example-app-cmd-domain/pom.xml +++ b/example/example-app/example-app-cmd-domain/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot example-app - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-app/example-app-cmd-meta/pom.xml b/example/example-app/example-app-cmd-meta/pom.xml index 0cf83b6c..ed09466e 100644 --- a/example/example-app/example-app-cmd-meta/pom.xml +++ b/example/example-app/example-app-cmd-meta/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot example-app - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-app/example-app-query/pom.xml b/example/example-app/example-app-query/pom.xml index 78ec5c22..fe11d075 100644 --- a/example/example-app/example-app-query/pom.xml +++ b/example/example-app/example-app-query/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot example-app - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-app/pom.xml b/example/example-app/pom.xml index d673326b..a222df23 100644 --- a/example/example-app/pom.xml +++ b/example/example-app/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot springboot-example - 3.3.67 + 3.3.68 ../pom.xml pom diff --git a/example/example-domain/example-domain-leave/pom.xml b/example/example-domain/example-domain-leave/pom.xml index 36398435..1b37d3d2 100644 --- a/example/example-domain/example-domain-leave/pom.xml +++ b/example/example-domain/example-domain-leave/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot example-domain - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-domain/example-domain-user/pom.xml b/example/example-domain/example-domain-user/pom.xml index f3a66ac4..54d39e76 100644 --- a/example/example-domain/example-domain-user/pom.xml +++ b/example/example-domain/example-domain-user/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot example-domain - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-domain/pom.xml b/example/example-domain/pom.xml index d52a4e2d..c12b6466 100644 --- a/example/example-domain/pom.xml +++ b/example/example-domain/pom.xml @@ -5,7 +5,7 @@ com.codingapi.springboot springboot-example - 3.3.67 + 3.3.68 ../pom.xml 4.0.0 diff --git a/example/example-infra/example-infra-flow/pom.xml b/example/example-infra/example-infra-flow/pom.xml index b9c6af79..44d8f0c6 100644 --- a/example/example-infra/example-infra-flow/pom.xml +++ b/example/example-infra/example-infra-flow/pom.xml @@ -5,7 +5,7 @@ com.codingapi.springboot example-infra - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-infra/example-infra-jpa/pom.xml b/example/example-infra/example-infra-jpa/pom.xml index f70a8330..5e9b6a28 100644 --- a/example/example-infra/example-infra-jpa/pom.xml +++ b/example/example-infra/example-infra-jpa/pom.xml @@ -5,7 +5,7 @@ com.codingapi.springboot example-infra - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-infra/example-infra-security/pom.xml b/example/example-infra/example-infra-security/pom.xml index 0ca88be1..8542f6be 100644 --- a/example/example-infra/example-infra-security/pom.xml +++ b/example/example-infra/example-infra-security/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot example-infra - 3.3.67 + 3.3.68 ../pom.xml diff --git a/example/example-infra/pom.xml b/example/example-infra/pom.xml index 79f2f970..cb96f73c 100644 --- a/example/example-infra/pom.xml +++ b/example/example-infra/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot springboot-example - 3.3.67 + 3.3.68 ../pom.xml pom diff --git a/example/example-interface/pom.xml b/example/example-interface/pom.xml index f437b16a..74fac464 100644 --- a/example/example-interface/pom.xml +++ b/example/example-interface/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot springboot-example - 3.3.67 + 3.3.68 example-interface diff --git a/example/example-server/pom.xml b/example/example-server/pom.xml index bc4d2a98..248b4b3b 100644 --- a/example/example-server/pom.xml +++ b/example/example-server/pom.xml @@ -5,7 +5,7 @@ springboot-example com.codingapi.springboot - 3.3.67 + 3.3.68 4.0.0 diff --git a/example/pom.xml b/example/pom.xml index cad63d6c..0f7f2385 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -19,7 +19,7 @@ springboot-example - 3.3.67 + 3.3.68 springboot-example springboot-example project for Spring Boot diff --git a/pom.xml b/pom.xml index 7a2e25b4..2694fc12 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ com.codingapi.springboot springboot-parent - 3.3.67 + 3.3.68 https://github.com/codingapi/springboot-framewrok springboot-parent diff --git a/springboot-starter-data-authorization/pom.xml b/springboot-starter-data-authorization/pom.xml index 8b0ce102..15df8892 100644 --- a/springboot-starter-data-authorization/pom.xml +++ b/springboot-starter-data-authorization/pom.xml @@ -6,7 +6,7 @@ com.codingapi.springboot springboot-parent - 3.3.67 + 3.3.68 springboot-starter-data-authorization diff --git a/springboot-starter-data-authorization/src/main/java/com/codingapi/springboot/authorization/interceptor/SQLRunningContext.java b/springboot-starter-data-authorization/src/main/java/com/codingapi/springboot/authorization/interceptor/SQLRunningContext.java index fab68f60..c22d4e25 100644 --- a/springboot-starter-data-authorization/src/main/java/com/codingapi/springboot/authorization/interceptor/SQLRunningContext.java +++ b/springboot-starter-data-authorization/src/main/java/com/codingapi/springboot/authorization/interceptor/SQLRunningContext.java @@ -3,6 +3,7 @@ import lombok.Getter; import java.sql.SQLException; +import java.util.function.Supplier; /** * SQLRunningContext SQL执行拦截上下文 @@ -55,7 +56,7 @@ public SQLInterceptState intercept(String sql) throws SQLException { * @param T * @return T */ - public T skipDataAuthorization(java.util.function.Supplier supplier) { + public T skipDataAuthorization(Supplier supplier) { try { skipInterceptor.set(true); return (T) supplier.get(); @@ -64,4 +65,19 @@ public T skipDataAuthorization(java.util.function.Supplier supplier) { } } + + /** + * 跳过数据权限拦截 + * + * @param runnable 业务逻辑 + */ + public void skipDataAuthorization(Runnable runnable) { + try { + skipInterceptor.set(true); + runnable.run(); + } finally { + skipInterceptor.set(false); + } + } + } diff --git a/springboot-starter-data-fast/pom.xml b/springboot-starter-data-fast/pom.xml index 5385cece..a99cf1b7 100644 --- a/springboot-starter-data-fast/pom.xml +++ b/springboot-starter-data-fast/pom.xml @@ -5,7 +5,7 @@ springboot-parent com.codingapi.springboot - 3.3.67 + 3.3.68 4.0.0 diff --git a/springboot-starter-flow/pom.xml b/springboot-starter-flow/pom.xml index beb5c729..7bc7020b 100644 --- a/springboot-starter-flow/pom.xml +++ b/springboot-starter-flow/pom.xml @@ -6,7 +6,7 @@ springboot-parent com.codingapi.springboot - 3.3.67 + 3.3.68 springboot-starter-flow diff --git a/springboot-starter-security/pom.xml b/springboot-starter-security/pom.xml index cba59a0a..aef8bc2f 100644 --- a/springboot-starter-security/pom.xml +++ b/springboot-starter-security/pom.xml @@ -6,7 +6,7 @@ springboot-parent com.codingapi.springboot - 3.3.67 + 3.3.68 springboot-starter-security diff --git a/springboot-starter/pom.xml b/springboot-starter/pom.xml index 304c925c..79f9c73e 100644 --- a/springboot-starter/pom.xml +++ b/springboot-starter/pom.xml @@ -5,7 +5,7 @@ com.codingapi.springboot springboot-parent - 3.3.67 + 3.3.68 springboot-starter diff --git a/springboot-starter/src/main/resources/banner.txt b/springboot-starter/src/main/resources/banner.txt index 2a3f1121..6d1333c6 100644 --- a/springboot-starter/src/main/resources/banner.txt +++ b/springboot-starter/src/main/resources/banner.txt @@ -1,4 +1,4 @@ ------------------------------------------------------ -CodingApi SpringBoot-Starter 3.3.67 +CodingApi SpringBoot-Starter 3.3.68 springboot version (${spring-boot.version}) ------------------------------------------------------