Merge branch 'master-jdk21' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk21
# Conflicts: # yudao-framework/yudao-spring-boot-starter-flowable/src/main/java/cn/iocoder/yudao/framework/flowable/config/YudaoFlowableConfiguration.java # yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java # yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmProcessDefinitionServiceImpl.java # yudao-module-report/yudao-module-report-biz/pom.xml # yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java # yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/config/UReportConfiguration.java # yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/core/UReportDataSource.java # yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/ureport/core/UReportDatabaseProvider.java
This commit is contained in:
commit
63e3bcce60
|
|
@ -71,7 +71,7 @@
|
||||||
<aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
|
<aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
|
||||||
<tencentcloud-sdk-java.version>3.1.880</tencentcloud-sdk-java.version>
|
<tencentcloud-sdk-java.version>3.1.880</tencentcloud-sdk-java.version>
|
||||||
<justauth.version>2.0.5</justauth.version>
|
<justauth.version>2.0.5</justauth.version>
|
||||||
<jimureport.version>1.6.1</jimureport.version>
|
<jimureport.version>1.6.6-beta2</jimureport.version>
|
||||||
<xercesImpl.version>2.12.2</xercesImpl.version>
|
<xercesImpl.version>2.12.2</xercesImpl.version>
|
||||||
<weixin-java.version>4.5.7.B</weixin-java.version>
|
<weixin-java.version>4.5.7.B</weixin-java.version>
|
||||||
<ureport2.version>2.2.9</ureport2.version>
|
<ureport2.version>2.2.9</ureport2.version>
|
||||||
|
|
@ -631,7 +631,7 @@
|
||||||
<!-- 积木报表-->
|
<!-- 积木报表-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.jimureport</groupId>
|
<groupId>org.jeecgframework.jimureport</groupId>
|
||||||
<artifactId>jimureport-spring-boot-starter</artifactId>
|
<artifactId>jimureport-spring-boot3-starter</artifactId>
|
||||||
<version>${jimureport.version}</version>
|
<version>${jimureport.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
package cn.iocoder.yudao.framework.common.util.cache;
|
package cn.iocoder.yudao.framework.common.util.cache;
|
||||||
|
|
||||||
|
import com.alibaba.ttl.threadpool.TtlExecutors;
|
||||||
import com.google.common.cache.CacheBuilder;
|
import com.google.common.cache.CacheBuilder;
|
||||||
import com.google.common.cache.CacheLoader;
|
import com.google.common.cache.CacheLoader;
|
||||||
import com.google.common.cache.LoadingCache;
|
import com.google.common.cache.LoadingCache;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15,11 +17,13 @@ import java.util.concurrent.Executors;
|
||||||
public class CacheUtils {
|
public class CacheUtils {
|
||||||
|
|
||||||
public static <K, V> LoadingCache<K, V> buildAsyncReloadingCache(Duration duration, CacheLoader<K, V> loader) {
|
public static <K, V> LoadingCache<K, V> buildAsyncReloadingCache(Duration duration, CacheLoader<K, V> loader) {
|
||||||
|
Executor executor = Executors.newCachedThreadPool( // TODO 芋艿:可能要思考下,未来要不要做成可配置
|
||||||
|
TtlExecutors.getDefaultDisableInheritableThreadFactory()); // TTL 保证 ThreadLocal 可以透传
|
||||||
return CacheBuilder.newBuilder()
|
return CacheBuilder.newBuilder()
|
||||||
// 只阻塞当前数据加载线程,其他线程返回旧值
|
// 只阻塞当前数据加载线程,其他线程返回旧值
|
||||||
.refreshAfterWrite(duration)
|
.refreshAfterWrite(duration)
|
||||||
// 通过 asyncReloading 实现全异步加载,包括 refreshAfterWrite 被阻塞的加载线程
|
// 通过 asyncReloading 实现全异步加载,包括 refreshAfterWrite 被阻塞的加载线程
|
||||||
.build(CacheLoader.asyncReloading(loader, Executors.newCachedThreadPool())); // TODO 芋艿:可能要思考下,未来要不要做成可配置
|
.build(CacheLoader.asyncReloading(loader, executor));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.iocoder.yudao.framework.tenant.core.context;
|
package cn.iocoder.yudao.framework.tenant.core.context;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.common.enums.DocumentEnum;
|
import cn.iocoder.yudao.framework.common.enums.DocumentEnum;
|
||||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||||
|
|
||||||
|
|
@ -21,7 +22,7 @@ public class TenantContextHolder {
|
||||||
private static final ThreadLocal<Boolean> IGNORE = new TransmittableThreadLocal<>();
|
private static final ThreadLocal<Boolean> IGNORE = new TransmittableThreadLocal<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得租户编号。
|
* 获得租户编号
|
||||||
*
|
*
|
||||||
* @return 租户编号
|
* @return 租户编号
|
||||||
*/
|
*/
|
||||||
|
|
@ -29,6 +30,16 @@ public class TenantContextHolder {
|
||||||
return TENANT_ID.get();
|
return TENANT_ID.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得租户编号 String
|
||||||
|
*
|
||||||
|
* @return 租户编号
|
||||||
|
*/
|
||||||
|
public static String getTenantIdStr() {
|
||||||
|
Long tenantId = getTenantId();
|
||||||
|
return StrUtil.toStringOrNull(tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得租户编号。如果不存在,则抛出 NullPointerException 异常
|
* 获得租户编号。如果不存在,则抛出 NullPointerException 异常
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
|
||||||
}
|
}
|
||||||
// 腾讯云必须有 region,否则会报错
|
// 腾讯云必须有 region,否则会报错
|
||||||
if (config.getEndpoint().contains(ENDPOINT_TENCENT)) {
|
if (config.getEndpoint().contains(ENDPOINT_TENCENT)) {
|
||||||
return StrUtil.subAfter(config.getEndpoint(), ".cos.", false)
|
return StrUtil.subAfter(config.getEndpoint(), "cos.", false)
|
||||||
.replaceAll("." + ENDPOINT_TENCENT, ""); // 去除 Endpoint
|
.replaceAll("." + ENDPOINT_TENCENT, ""); // 去除 Endpoint
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@ server:
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration # 排除积木报表带来的 MongoDB 的自动配置
|
|
||||||
datasource:
|
datasource:
|
||||||
druid: # Druid 【监控】相关的全局配置
|
druid: # Druid 【监控】相关的全局配置
|
||||||
web-stat-filter:
|
web-stat-filter:
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration # 排除积木报表带来的 MongoDB 的自动配置
|
|
||||||
- org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 默认 local 环境,不开启 Quartz 的自动配置
|
- org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 默认 local 环境,不开启 Quartz 的自动配置
|
||||||
- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
||||||
- de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
|
- de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
|
||||||
|
|
@ -188,6 +187,7 @@ logging:
|
||||||
cn.iocoder.yudao.module.trade.dal.mysql: debug
|
cn.iocoder.yudao.module.trade.dal.mysql: debug
|
||||||
cn.iocoder.yudao.module.promotion.dal.mysql: debug
|
cn.iocoder.yudao.module.promotion.dal.mysql: debug
|
||||||
cn.iocoder.yudao.module.statistics.dal.mysql: debug
|
cn.iocoder.yudao.module.statistics.dal.mysql: debug
|
||||||
|
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||||
|
|
||||||
debug: false
|
debug: false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -260,9 +260,9 @@ yudao:
|
||||||
debug: false
|
debug: false
|
||||||
|
|
||||||
# 积木报表配置
|
# 积木报表配置
|
||||||
minidao :
|
jeecg:
|
||||||
base-package: org.jeecg.modules.jmreport.desreport.dao*
|
jmreport:
|
||||||
db-type: mysql
|
saas-mode: tenant
|
||||||
|
|
||||||
# UReport 配置
|
# UReport 配置
|
||||||
ureport:
|
ureport:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue