File tree Expand file tree Collapse file tree 8 files changed +24
-8
lines changed
springboot-starter-data-authorization
src/main/java/com/codingapi/springboot/authorization/interceptor
springboot-starter-data-fast
springboot-starter-security
src/main/resources/META-INF Expand file tree Collapse file tree 8 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1515
1616 <groupId >com.codingapi.springboot</groupId >
1717 <artifactId >springboot-parent</artifactId >
18- <version >2.9.33 </version >
18+ <version >2.9.34 </version >
1919
2020 <url >https://github.com/codingapi/springboot-framewrok</url >
2121 <name >springboot-parent</name >
Original file line number Diff line number Diff line change 66 <parent >
77 <artifactId >springboot-parent</artifactId >
88 <groupId >com.codingapi.springboot</groupId >
9- <version >2.9.33 </version >
9+ <version >2.9.34 </version >
1010 </parent >
1111
1212 <artifactId >springboot-starter-data-authorization</artifactId >
Original file line number Diff line number Diff line change 33import lombok .Getter ;
44
55import java .sql .SQLException ;
6+ import java .util .function .Supplier ;
67
78/**
89 * SQLRunningContext SQL执行拦截上下文
@@ -55,7 +56,7 @@ public SQLInterceptState intercept(String sql) throws SQLException {
5556 * @param <T> T
5657 * @return T
5758 */
58- public <T > T skipDataAuthorization (java . util . function . Supplier <T > supplier ) {
59+ public <T > T skipDataAuthorization (Supplier <T > supplier ) {
5960 try {
6061 skipInterceptor .set (true );
6162 return (T ) supplier .get ();
@@ -64,4 +65,19 @@ public <T> T skipDataAuthorization(java.util.function.Supplier<T> supplier) {
6465 }
6566 }
6667
68+
69+ /**
70+ * 跳过数据权限拦截
71+ *
72+ * @param runnable 业务逻辑
73+ */
74+ public void skipDataAuthorization (Runnable runnable ) {
75+ try {
76+ skipInterceptor .set (true );
77+ runnable .run ();
78+ } finally {
79+ skipInterceptor .set (false );
80+ }
81+ }
82+
6783}
Original file line number Diff line number Diff line change 55 <parent >
66 <artifactId >springboot-parent</artifactId >
77 <groupId >com.codingapi.springboot</groupId >
8- <version >2.9.33 </version >
8+ <version >2.9.34 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
Original file line number Diff line number Diff line change 66 <parent >
77 <artifactId >springboot-parent</artifactId >
88 <groupId >com.codingapi.springboot</groupId >
9- <version >2.9.33 </version >
9+ <version >2.9.34 </version >
1010 </parent >
1111
1212 <name >springboot-starter-flow</name >
Original file line number Diff line number Diff line change 66 <parent >
77 <artifactId >springboot-parent</artifactId >
88 <groupId >com.codingapi.springboot</groupId >
9- <version >2.9.33 </version >
9+ <version >2.9.34 </version >
1010 </parent >
1111
1212 <artifactId >springboot-starter-security</artifactId >
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >com.codingapi.springboot</groupId >
77 <artifactId >springboot-parent</artifactId >
8- <version >2.9.33 </version >
8+ <version >2.9.34 </version >
99 </parent >
1010 <artifactId >springboot-starter</artifactId >
1111
Original file line number Diff line number Diff line change 11------------------------------------------------------
2- CodingApi SpringBoot-Starter 2.9.33
2+ CodingApi SpringBoot-Starter 2.9.34
33springboot version (${spring-boot.version})
44------------------------------------------------------
You can’t perform that action at this time.
0 commit comments