diff --git a/config/dev/application.yml b/config/dev/application.yml
index f1966db3..def48e77 100644
--- a/config/dev/application.yml
+++ b/config/dev/application.yml
@@ -48,7 +48,12 @@ dubbo:
spring:
main:
+ allow-circular-references: true
allow-bean-definition-overriding: true
+ mvc:
+ pathmatch:
+ # 适配 boot 2.6 路由与 springfox 兼容
+ matching-strategy: ANT_PATH_MATCHER
#jackson配置
jackson:
# 日期格式化
@@ -64,6 +69,9 @@ spring:
cloud:
# sentinel 配置
sentinel:
+ filter:
+ # sentinel 在 springboot 2.6.x 不兼容问题的处理
+ enabled: false
# 取消控制台懒加载
eager: true
transport:
diff --git a/pom.xml b/pom.xml
index bccac530..3cf9c570 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,16 +17,16 @@
UTF-8
UTF-8
1.8
- 2.5.8
- 2020.0.4
+ 2.6.2
+ 2021.0.0
2021.1
2.0.3
- 2.5.4
+ 2.6.0
2.2.0
1.6.2
1.27.2
2.3.2
- 1.4.0
+ 1.4.1
1.2.8
3.5.0
2.11.0
@@ -34,7 +34,6 @@
2.3
8.2.2
4.1.2
- 2.10.0
3.2.2
2.12.2
5.7.18
@@ -184,6 +183,12 @@
${spring-boot.mybatis}
+
+ io.swagger
+ swagger-models
+ ${swagger.core.version}
+
+
io.swagger
@@ -240,13 +245,6 @@
${transmittable-thread-local.version}
-
-
- org.apache.commons
- commons-pool2
- ${common-pool.version}
-
-
org.redisson
diff --git a/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java b/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java
new file mode 100644
index 00000000..28394ead
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java
@@ -0,0 +1,26 @@
+package com.ruoyi.common.datasource.env;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.env.EnvironmentPostProcessor;
+import org.springframework.core.Ordered;
+import org.springframework.core.env.ConfigurableEnvironment;
+
+/**
+ * seata 在 springboot 2.6.x 存在循环引用问题的处理
+ *
+ * @author ruoyi
+ */
+public class ApplicationSeataInitializer implements EnvironmentPostProcessor, Ordered
+{
+ @Override
+ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application)
+ {
+ System.setProperty("spring.main.allow-circular-references", "true");
+ }
+
+ @Override
+ public int getOrder()
+ {
+ return Ordered.LOWEST_PRECEDENCE;
+ }
+}
diff --git a/ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories b/ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000..bdfc1f69
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,2 @@
+org.springframework.boot.env.EnvironmentPostProcessor=\
+ com.ruoyi.common.datasource.env.ApplicationSeataInitializer
diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java
new file mode 100644
index 00000000..bdfba05c
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java
@@ -0,0 +1,43 @@
+package com.ruoyi.common.swagger.config;
+
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ReflectionUtils;
+import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
+import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
+import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
+
+import java.lang.reflect.Field;
+import java.util.List;
+
+/**
+ * swagger 在 springboot 2.6.x 不兼容问题的处理
+ *
+ * @author ruoyi
+ */
+@Component
+@SuppressWarnings("all")
+public class SwaggerBeanPostProcessor implements BeanPostProcessor {
+ @Override
+ public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
+ if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
+ customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
+ }
+ return bean;
+ }
+
+ private void customizeSpringfoxHandlerMappings(List mappings) {
+ mappings.removeIf(mapping -> mapping.getPatternParser() != null);
+ }
+
+ private List getHandlerMappings(Object bean) {
+ try {
+ Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
+ field.setAccessible(true);
+ return (List) field.get(bean);
+ } catch (IllegalArgumentException | IllegalAccessException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+}
diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/resources/META-INF/spring.factories b/ruoyi-common/ruoyi-common-swagger/src/main/resources/META-INF/spring.factories
index 83dfc580..727b377b 100644
--- a/ruoyi-common/ruoyi-common-swagger/src/main/resources/META-INF/spring.factories
+++ b/ruoyi-common/ruoyi-common-swagger/src/main/resources/META-INF/spring.factories
@@ -1,2 +1,3 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- com.ruoyi.common.swagger.config.SwaggerAutoConfiguration
+ com.ruoyi.common.swagger.config.SwaggerAutoConfiguration,\
+ com.ruoyi.common.swagger.config.SwaggerBeanPostProcessor
diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml
index 03f31bb9..77cf6666 100644
--- a/ruoyi-gateway/src/main/resources/bootstrap.yml
+++ b/ruoyi-gateway/src/main/resources/bootstrap.yml
@@ -1,33 +1,33 @@
-# Tomcat
-server:
- port: 8080
-
-# Spring
-spring:
- application:
- # 应用名称
- name: ruoyi-gateway
- profiles:
- # 环境配置
- active: @profiles.active@
-
---- # nacos 配置
-spring:
- cloud:
- nacos:
- # nacos 服务地址
- server-addr: @nacos.server@
- discovery:
- # 注册组
- group: @nacos.discovery.group@
- namespace: ${spring.profiles.active}
- config:
- # 配置组
- group: @nacos.config.group@
- namespace: ${spring.profiles.active}
- # 配置文件格式
- file-extension: yml
- # 共享配置
- shared-configs:
- - data-id: application.${spring.cloud.nacos.config.file-extension}
- refresh: true
+# Tomcat
+server:
+ port: 8080
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: ruoyi-gateway
+ profiles:
+ # 环境配置
+ active: @profiles.active@
+
+--- # nacos 配置
+spring:
+ cloud:
+ nacos:
+ # nacos 服务地址
+ server-addr: @nacos.server@
+ discovery:
+ # 注册组
+ group: @nacos.discovery.group@
+ namespace: ${spring.profiles.active}
+ config:
+ # 配置组
+ group: @nacos.config.group@
+ namespace: ${spring.profiles.active}
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - data-id: application.${spring.cloud.nacos.config.file-extension}
+ refresh: true
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
index 059a80b6..d57bbdf0 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
@@ -17,13 +17,12 @@
v-model="queryParams.${column.javaField}"
placeholder="请输入${comment}"
clearable
- size="small"
@keyup.enter="handleQuery"
/>
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
-
+
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
-
+
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
-
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -75,7 +72,6 @@
type="primary"
plain
icon="Plus"
- size="mini"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
>新增
@@ -132,21 +128,18 @@
修改
新增
#elseif($column.htmlType == "datetime")
-
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
-
+
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
-
+
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
-
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
-
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -75,7 +72,6 @@
type="primary"
plain
icon="Plus"
- size="mini"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
>新增
@@ -85,7 +81,6 @@
type="success"
plain
icon="Edit"
- size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['${moduleName}:${businessName}:edit']"
@@ -96,7 +91,6 @@
type="danger"
plain
icon="Delete"
- size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['${moduleName}:${businessName}:remove']"
@@ -107,7 +101,6 @@
type="warning"
plain
icon="Download"
- size="mini"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出
@@ -156,14 +149,12 @@
修改
@@ -265,7 +256,7 @@
#elseif($column.htmlType == "datetime")
- ${subTable.functionName}信息
- 添加
+ 添加
- 删除
+ 删除
diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue
index 66e62964..41c36a89 100644
--- a/ruoyi-ui/src/views/system/dept/index.vue
+++ b/ruoyi-ui/src/views/system/dept/index.vue
@@ -106,6 +106,8 @@
+
+
@@ -116,6 +118,8 @@
+
+
@@ -126,6 +130,8 @@
+
+