diff --git a/pigx-common/pigx-common-bom/pom.xml b/pigx-common/pigx-common-bom/pom.xml index 2ebf6a1de..3764e81af 100644 --- a/pigx-common/pigx-common-bom/pom.xml +++ b/pigx-common/pigx-common-bom/pom.xml @@ -32,7 +32,7 @@ 3.0.3 1.13.1 2.3.6.RELEASE - 1.2.75 + 1.2.83 2.3.0 3.0.52.ALL 1.11.543 diff --git a/pigx-common/pigx-common-log/src/main/java/com/pig4cloud/pigx/common/log/aspect/SysLogAspect.java b/pigx-common/pigx-common-log/src/main/java/com/pig4cloud/pigx/common/log/aspect/SysLogAspect.java index 1e1a81374..1ea5507ec 100644 --- a/pigx-common/pigx-common-log/src/main/java/com/pig4cloud/pigx/common/log/aspect/SysLogAspect.java +++ b/pigx-common/pigx-common-log/src/main/java/com/pig4cloud/pigx/common/log/aspect/SysLogAspect.java @@ -66,7 +66,8 @@ public class SysLogAspect { EvaluationContext context = SysLogUtils.getContext(point.getArgs(), signature.getMethod()); try { value = SysLogUtils.getValue(context, expression, String.class); - } catch (Exception e) { + } + catch (Exception e) { // SPEL 表达式异常,则获取 value 的值 log.error("@SysLog 解析SPEL {} 异常", expression); } diff --git a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/BaseDbHelper.java b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/BaseDbHelper.java index e1b3e2121..3dbe3e461 100755 --- a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/BaseDbHelper.java +++ b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/BaseDbHelper.java @@ -1,7 +1,7 @@ package com.pig4cloud.pigx.common.sequence.range.impl.db; -import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator; import com.pig4cloud.pigx.common.core.util.SpringContextHolder; import com.pig4cloud.pigx.common.sequence.exception.SeqException; import com.pig4cloud.pigx.common.sequence.range.impl.db.provider.SqlProviderFactory; @@ -21,6 +21,8 @@ abstract class BaseDbHelper { private static final long DELTA = 100000000L; + private final static DefaultIdentifierGenerator identifierGenerator = new DefaultIdentifierGenerator(); + /** * 创建表 * @param dataSource DB来源 @@ -60,7 +62,7 @@ abstract class BaseDbHelper { try { conn = dataSource.getConnection(); stmt = conn.prepareStatement(SQL_PROVIDER_FACTORY.getInsertRangeSql().replace("#tableName", tableName)); - stmt.setLong(1, RandomUtil.randomLong(12)); + stmt.setLong(1, identifierGenerator.nextId(null)); stmt.setString(2, name); stmt.setLong(3, stepStart); stmt.setTimestamp(4, new Timestamp(System.currentTimeMillis())); diff --git a/pigx-gateway/src/main/resources/logback-spring.xml b/pigx-gateway/src/main/resources/logback-spring.xml index 779ee5e25..232d13ee7 100644 --- a/pigx-gateway/src/main/resources/logback-spring.xml +++ b/pigx-gateway/src/main/resources/logback-spring.xml @@ -25,64 +25,66 @@ 2. 注意修改 的value模块 --> - - - - - - - - - - - ${CONSOLE_LOG_PATTERN} - - + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + - - - ${log.path}/debug.log - - ${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz - 50MB - 30 - - - %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n - - + + + ${log.path}/debug.log + + ${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + - - - ${log.path}/error.log - - ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz - 50MB - 30 - - - %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n - - - ERROR - - + + + ${log.path}/error.log + + ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz + 50MB + 30 + + + %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n + + + ERROR + + - - - + + + + - - - - - - - - - - + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index ad747c3b8..4979dfbb2 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ - 2.6.7 + 2.6.8 2021.0.2 2021.0.1.0 UTF-8