From 9926f73cd031a9cebff033ad8bb00998cbcf26d7 Mon Sep 17 00:00:00 2001 From: Giovanni <8391690+giovanni_chien@user.noreply.gitee.com> Date: Wed, 1 Feb 2023 15:58:40 +0800 Subject: [PATCH 1/5] =?UTF-8?q?tagsView=E5=8F=B3=E9=80=89=E6=A1=86?= =?UTF-8?q?=EF=BC=8C=E9=A6=96=E9=A1=B5=E4=B8=8D=E5=BA=94=E8=AF=A5=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E5=85=B3=E9=97=AD=E5=B7=A6=E4=BE=A7=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/components/TagsView/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue index cbd9a253..d69f7ae2 100644 --- a/ruoyi-ui/src/layout/components/TagsView/index.vue +++ b/ruoyi-ui/src/layout/components/TagsView/index.vue @@ -87,7 +87,7 @@ export default { }, isFirstView() { try { - return this.selectedTag.fullPath === this.visitedViews[1].fullPath || this.selectedTag.fullPath === '/index' + return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath } catch (err) { return false } From 5873da87aea72fa09b04982f40cfe733daa31af4 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 4 Feb 2023 22:25:33 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1bean=E8=BF=9D=E8=A7=84=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java index e6dea109..ab829e69 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java @@ -134,6 +134,8 @@ public class ScheduleUtils return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR); } Object obj = SpringUtils.getBean(StringUtils.split(invokeTarget, ".")[0]); - return StringUtils.containsAnyIgnoreCase(obj.getClass().getPackage().getName(), Constants.JOB_WHITELIST_STR); + String beanPackageName = obj.getClass().getPackage().getName(); + return StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_WHITELIST_STR) + && !StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_ERROR_STR); } } From eb96afee64436e886d409b39e1b3035de29b15fb Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 4 Feb 2023 22:25:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E6=B1=A0Druid=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=96=B0=E7=9A=84=E9=85=8D=E7=BD=AEconnectTimeout?= =?UTF-8?q?=E5=92=8CsocketTimeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application-druid.yml | 4 ++++ .../framework/config/properties/DruidProperties.java | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 1f098e40..bcfad3ea 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -24,6 +24,10 @@ spring: maxActive: 20 # 配置获取连接等待超时的时间 maxWait: 60000 + # 配置连接超时时间 + connectTimeout: 30000 + # 配置网络超时时间 + socketTimeout: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 timeBetweenEvictionRunsMillis: 60000 # 配置一个连接在池中最小生存的时间,单位是毫秒 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java index ae6e02fd..2dd49ab9 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java @@ -24,6 +24,12 @@ public class DruidProperties @Value("${spring.datasource.druid.maxWait}") private int maxWait; + @Value("${spring.datasource.druid.connectTimeout}") + private int connectTimeout; + + @Value("${spring.datasource.druid.socketTimeout}") + private int socketTimeout; + @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") private int timeBetweenEvictionRunsMillis; @@ -54,6 +60,12 @@ public class DruidProperties /** 配置获取连接等待超时的时间 */ datasource.setMaxWait(maxWait); + + /** 配置驱动连接超时时间,检测数据库建立连接的超时时间,单位是毫秒 */ + datasource.setConnectTimeout(connectTimeout); + + /** 配置网络超时时间,等待数据库操作完成的网络超时时间,单位是毫秒 */ + datasource.setSocketTimeout(socketTimeout); /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); From c3d0cd5f8c82a67f6f1cfdec2ed6c02c47ceaaf9 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 4 Feb 2023 22:26:02 +0800 Subject: [PATCH 4/5] update copyright 2023 --- ruoyi-ui/src/permission.js | 2 +- ruoyi-ui/src/views/login.vue | 2 +- ruoyi-ui/src/views/register.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index 6bb0a1f8..609d2159 100644 --- a/ruoyi-ui/src/permission.js +++ b/ruoyi-ui/src/permission.js @@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] +const whiteList = ['/login', '/register'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 074fecd3..cdae8dc7 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -56,7 +56,7 @@ diff --git a/ruoyi-ui/src/views/register.vue b/ruoyi-ui/src/views/register.vue index d8ec3c18..e4f2df6f 100644 --- a/ruoyi-ui/src/views/register.vue +++ b/ruoyi-ui/src/views/register.vue @@ -61,7 +61,7 @@ From 5676cf9ad4159f10e527b9f040b2e1d6d1ab8c09 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 6 Feb 2023 11:20:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8C=BF=E5=90=8D?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3Anonymous=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98(I683DT)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/config/properties/PermitAllUrlProperties.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/PermitAllUrlProperties.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/PermitAllUrlProperties.java index 7acd0ab0..f1dcbfcb 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/PermitAllUrlProperties.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/PermitAllUrlProperties.java @@ -3,6 +3,7 @@ package com.ruoyi.framework.config.properties; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.regex.Pattern; import org.apache.commons.lang3.RegExUtils; @@ -44,12 +45,12 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont // 获取方法上边的注解 替代path variable 为 * Anonymous method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Anonymous.class); - Optional.ofNullable(method).ifPresent(anonymous -> info.getPatternsCondition().getPatterns() + Optional.ofNullable(method).ifPresent(anonymous -> Objects.requireNonNull(info.getPatternsCondition().getPatterns()) .forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK)))); // 获取类上边的注解, 替代path variable 为 * Anonymous controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Anonymous.class); - Optional.ofNullable(controller).ifPresent(anonymous -> info.getPatternsCondition().getPatterns() + Optional.ofNullable(controller).ifPresent(anonymous -> Objects.requireNonNull(info.getPatternsCondition().getPatterns()) .forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK)))); }); }