Merge branch 'dev' into test
This commit is contained in:
3
pom.xml
3
pom.xml
@@ -25,6 +25,7 @@
|
|||||||
<module>zt-module-databus</module>
|
<module>zt-module-databus</module>
|
||||||
<!-- <module>zt-module-rule</module>-->
|
<!-- <module>zt-module-rule</module>-->
|
||||||
<!-- <module>zt-module-html2pdf</module>-->
|
<!-- <module>zt-module-html2pdf</module>-->
|
||||||
|
<!-- <module>zt-server</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.0.46</revision>
|
<revision>3.0.47-SNAPSHOT</revision>
|
||||||
<!-- Maven 相关 -->
|
<!-- Maven 相关 -->
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.0.46</revision>
|
<revision>3.0.47-SNAPSHOT</revision>
|
||||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.boot.version>3.4.5</spring.boot.version>
|
<spring.boot.version>3.4.5</spring.boot.version>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.concurrent.*;
|
|||||||
* 多次提交,一次等待
|
* 多次提交,一次等待
|
||||||
*/
|
*/
|
||||||
public class AsyncLatchUtils {
|
public class AsyncLatchUtils {
|
||||||
private static final ThreadLocal<List<TaskInfo>> THREADLOCAL = ThreadLocal.withInitial(LinkedList::new);
|
private static final ThreadLocal<List<TaskInfo>> THREAD_LOCAL = ThreadLocal.withInitial(LinkedList::new);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交一个异步任务
|
* 提交一个异步任务
|
||||||
@@ -17,7 +17,7 @@ public class AsyncLatchUtils {
|
|||||||
* @param runnable 需要异步执行的具体业务逻辑
|
* @param runnable 需要异步执行的具体业务逻辑
|
||||||
*/
|
*/
|
||||||
public static void submitTask(Executor executor, Runnable runnable) {
|
public static void submitTask(Executor executor, Runnable runnable) {
|
||||||
THREADLOCAL.get().add(new TaskInfo(executor, runnable));
|
THREAD_LOCAL.get().add(new TaskInfo(executor, runnable));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,8 +25,8 @@ public class AsyncLatchUtils {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static List<TaskInfo> popTask() {
|
private static List<TaskInfo> popTask() {
|
||||||
List<TaskInfo> taskInfos = THREADLOCAL.get();
|
List<TaskInfo> taskInfos = THREAD_LOCAL.get();
|
||||||
THREADLOCAL.remove();
|
THREAD_LOCAL.remove();
|
||||||
return taskInfos;
|
return taskInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ public class AsyncLatchUtils {
|
|||||||
*/
|
*/
|
||||||
public static boolean waitFor(long timeout, TimeUnit timeUnit) {
|
public static boolean waitFor(long timeout, TimeUnit timeUnit) {
|
||||||
List<TaskInfo> taskInfos = popTask();
|
List<TaskInfo> taskInfos = popTask();
|
||||||
if (taskInfos.isEmpty()) {
|
if (taskInfos.isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
CountDownLatch latch = new CountDownLatch(taskInfos.size());
|
CountDownLatch latch = new CountDownLatch(taskInfos.size());
|
||||||
@@ -57,8 +57,11 @@ public class AsyncLatchUtils {
|
|||||||
boolean await = false;
|
boolean await = false;
|
||||||
try {
|
try {
|
||||||
await = latch.await(timeout, timeUnit);
|
await = latch.await(timeout, timeUnit);
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {
|
||||||
return await;
|
// 恢复中断状态
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
|
return await;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class TaskInfo {
|
private static final class TaskInfo {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class BusinessDataPermissionEntityScanner {
|
|||||||
*/
|
*/
|
||||||
private static final Set<String> EXCLUDED_PACKAGE_PREFIXES = Set.of(
|
private static final Set<String> EXCLUDED_PACKAGE_PREFIXES = Set.of(
|
||||||
"com.zt.plat.module.backendlogistics",
|
"com.zt.plat.module.backendlogistics",
|
||||||
"com.zt.plat.module.erp",
|
// "com.zt.plat.module.erp",
|
||||||
"com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO");
|
"com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO");
|
||||||
|
|
||||||
private final Set<String> basePackages;
|
private final Set<String> basePackages;
|
||||||
|
|||||||
@@ -43,11 +43,11 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>com.zt.plat</groupId>
|
<!-- <groupId>com.zt.plat</groupId>-->
|
||||||
<artifactId>zt-module-template-server</artifactId>
|
<!-- <artifactId>zt-module-template-server</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- 会员中心。默认注释,保证编译速度 -->
|
<!-- 会员中心。默认注释,保证编译速度 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ spring:
|
|||||||
host: 172.16.46.63 # 地址
|
host: 172.16.46.63 # 地址
|
||||||
port: 30379 # 端口
|
port: 30379 # 端口
|
||||||
database: 0 # 数据库索引
|
database: 0 # 数据库索引
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
password: P@ssword25
|
||||||
|
username: zt-redis
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
--- #################### 定时任务相关配置 ####################
|
||||||
|
|
||||||
@@ -76,7 +77,7 @@ xxl:
|
|||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
name-server: 172.16.46.63:30876 # RocketMQ Namesrv
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
# RabbitMQ 配置项,对应 RabbitProperties 配置类
|
# RabbitMQ 配置项,对应 RabbitProperties 配置类
|
||||||
|
|||||||
Reference in New Issue
Block a user