diff --git a/pom.xml b/pom.xml index 74fe221a..4928afb6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 3.0.0 2.3.3 1.4.6 - 2.0.20 + 2.0.23 6.4.0 2.11.0 1.4 diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index c1a2a2ef..5b9df6f0 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-common/src/main/java/com/ruoyi/common/utils/StringUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java index f49d57ee..f2203ae8 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java @@ -481,7 +481,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils } /** - * 驼峰式命名法 例如:user_name->userName + * 驼峰式命名法 + * 例如:user_name->userName */ public static String toCamelCase(String s) { @@ -489,6 +490,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { return null; } + if (s.indexOf(SEPARATOR) == -1) + { + return s; + } s = s.toLowerCase(); StringBuilder sb = new StringBuilder(s.length()); boolean upperCase = false; 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); 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)))); }); } 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); } } diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 3c01645f..f98adcaa 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -43,7 +43,7 @@ "core-js": "3.25.3", "diagram-js": "^11.4.1", "echarts": "5.4.0", - "element-ui": "2.15.10", + "element-ui": "2.15.12", "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", diff --git a/ruoyi-ui/src/components/Process/components/nodePanel/property/signal.vue b/ruoyi-ui/src/components/Process/components/nodePanel/property/signal.vue index 2c29d734..0817586d 100644 --- a/ruoyi-ui/src/components/Process/components/nodePanel/property/signal.vue +++ b/ruoyi-ui/src/components/Process/components/nodePanel/property/signal.vue @@ -76,34 +76,57 @@ export default { }, mounted() { // this.formData.signal = this.element.businessObject.extensionElements?.values.map(item => { - // let type - // if ('class' in item.$attrs) type = 'class' - // if ('expression' in item.$attrs) type = 'expression' - // if ('delegateExpression' in item.$attrs) type = 'delegateExpression' - // return { - // event: item.$attrs.event, - // type: type, - // className: item.$attrs[type] - // } - // }) ?? [] + this.formData.signal = this.element.businessObject.extensionElements?.values + .filter(item => item.$type === 'bpmn:Signal') + .map(item => { + return { + scope: item.scope, + id: item.id, + name: item.name + } + }) ?? [] }, methods: { updateElement() { + // if (this.formData.signal?.length) { + // let extensionElements = this.element.businessObject.get('extensionElements') + // if (!extensionElements) { + // console.log(this.modeler.get('moddle'),"this.modeler.get('moddle')") + // extensionElements = this.modeler.get('moddle').create('bpmn:Signal') + // } + // extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'bpmn:Signal') ?? [] + // console.log(extensionElements,"extensionElements") + // const length = extensionElements.get('values').length + // for (let i = 0; i < length; i++) { + // // 清除旧值 + // extensionElements.get('values').pop() + // } + // this.updateProperties({ extensionElements: extensionElements }) + // } else { + // const extensionElements = this.element.businessObject[`extensionElements`] + // if (extensionElements) { + // extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'flowable:ExecutionListener') + // } + // } if (this.formData.signal?.length) { let extensionElements = this.element.businessObject.get('extensionElements') if (!extensionElements) { - extensionElements = this.modeler.get('moddle').create('bpmn:signal') - } - const length = extensionElements.get('values').length - for (let i = 0; i < length; i++) { - // 清除旧值 - extensionElements.get('values').pop() + extensionElements = this.modeler.get('moddle').create('bpmn:ExtensionElements') } + // 清除旧值 + extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'bpmn:Signal') ?? [] + this.formData.signal.forEach(item => { + const signal = this.modeler.get('moddle').create('bpmn:Signal') + signal['scope'] = item.scope + signal['id'] = item.id + signal['name'] = item.name + extensionElements.get('values').push(signal) + }) this.updateProperties({ extensionElements: extensionElements }) } else { const extensionElements = this.element.businessObject[`extensionElements`] if (extensionElements) { - extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'flowable:ExecutionListener') + extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'bpmn:Signal') ?? [] } } }, diff --git a/ruoyi-ui/src/components/Process/flowable/flowable.json b/ruoyi-ui/src/components/Process/flowable/flowable.json index 268752e8..3cde20a4 100644 --- a/ruoyi-ui/src/components/Process/flowable/flowable.json +++ b/ruoyi-ui/src/components/Process/flowable/flowable.json @@ -945,7 +945,8 @@ "bpmn:BoundaryEvent", "bpmn:CallActivity", "bpmn:SubProcess", - "bpmn:Process" + "bpmn:Process", + "bpmn:Signal" ] }, "properties": [ 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 } 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 @@