From 9bdae339cc1b0fc1102f694a3a8d14bbf19a3c9e Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 22 Jul 2022 12:08:59 +0800 Subject: [PATCH] update: hutool 5.6.1 ==> 5.7.22 --- yudao-dependencies/pom.xml | 2 +- .../iocoder/yudao/framework/common/util/json/JsonUtils.java | 2 +- .../yudao/framework/apollo/internals/DefaultXInjector.java | 4 ++-- .../yudao/framework/tracer/core/aop/BizTraceAspect.java | 2 +- .../iocoder/yudao/framework/test/core/util/RandomUtils.java | 4 ++-- .../swagger/config/YudaoSwaggerAutoConfiguration.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 52fc7d5bc..ec480e2a9 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -48,7 +48,7 @@ 3.0.4 1.18.20 1.4.1.Final - 5.6.1 + 5.7.22 3.1.1 2.2 1.0.5 diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/JsonUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/JsonUtils.java index 2a46edf6a..b36ce74cf 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/JsonUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/JsonUtils.java @@ -132,7 +132,7 @@ public class JsonUtils { } public static boolean isJson(String text) { - return JSONUtil.isJson(text); + return JSONUtil.isTypeJSON(text); } } diff --git a/yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/internals/DefaultXInjector.java b/yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/internals/DefaultXInjector.java index 554bad42f..ef9d17fc5 100644 --- a/yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/internals/DefaultXInjector.java +++ b/yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/internals/DefaultXInjector.java @@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.tracer.Tracer; import com.ctrip.framework.apollo.util.ConfigUtil; import com.ctrip.framework.apollo.util.factory.DefaultPropertiesFactory; import com.ctrip.framework.apollo.util.factory.PropertiesFactory; -import com.ctrip.framework.apollo.util.http.HttpUtil; +import com.ctrip.framework.apollo.util.http.DefaultHttpClient; import com.ctrip.framework.apollo.util.yaml.YamlParser; import com.google.inject.AbstractModule; import com.google.inject.Guice; @@ -63,7 +63,7 @@ public class DefaultXInjector implements Injector { bind(ConfigFactory.class).to(DBConfigFactory.class).in(Singleton.class); bind(ConfigUtil.class).in(Singleton.class); - bind(HttpUtil.class).in(Singleton.class); + bind(DefaultHttpClient.class).in(Singleton.class); bind(ConfigServiceLocator.class).in(Singleton.class); bind(RemoteConfigLongPollService.class).in(Singleton.class); bind(YamlParser.class).in(Singleton.class); diff --git a/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/core/aop/BizTraceAspect.java b/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/core/aop/BizTraceAspect.java index 7300352de..3c3b9f3bb 100644 --- a/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/core/aop/BizTraceAspect.java +++ b/yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/core/aop/BizTraceAspect.java @@ -38,7 +38,7 @@ public class BizTraceAspect { String operationName = getOperationName(joinPoint, trace); Span span = tracer.buildSpan(operationName) .withTag(Tags.COMPONENT.getKey(), "biz") - .startManual(); + .start(); try { // 执行原有方法 return joinPoint.proceed(); diff --git a/yudao-framework/yudao-spring-boot-starter-test/src/main/java/cn/iocoder/yudao/framework/test/core/util/RandomUtils.java b/yudao-framework/yudao-spring-boot-starter-test/src/main/java/cn/iocoder/yudao/framework/test/core/util/RandomUtils.java index d2703a0e7..d41c3951e 100644 --- a/yudao-framework/yudao-spring-boot-starter-test/src/main/java/cn/iocoder/yudao/framework/test/core/util/RandomUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-test/src/main/java/cn/iocoder/yudao/framework/test/core/util/RandomUtils.java @@ -40,7 +40,7 @@ public class RandomUtils { // Integer PODAM_FACTORY.getStrategy().addOrReplaceTypeManufacturer(Integer.class, (dataProviderStrategy, attributeMetadata, map) -> { // 如果是 status 的字段,返回 0 或 1 - if (attributeMetadata.getAttributeName().equals("status")) { + if ("status".equals(attributeMetadata.getAttributeName())) { return RandomUtil.randomEle(CommonStatusEnum.values()).getStatus(); } // 如果是 type、status 结尾的字段,返回 tinyint 范围 @@ -53,7 +53,7 @@ public class RandomUtils { // Boolean PODAM_FACTORY.getStrategy().addOrReplaceTypeManufacturer(Boolean.class, (dataProviderStrategy, attributeMetadata, map) -> { // 如果是 deleted 的字段,返回非删除 - if (attributeMetadata.getAttributeName().equals("deleted")) { + if ("deleted".equals(attributeMetadata.getAttributeName())) { return false; } return RandomUtil.randomBoolean(); diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java index b4b29974c..dbd490888 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java @@ -95,7 +95,7 @@ public class YudaoSwaggerAutoConfiguration { return Collections.singletonList(SecurityContext.builder() .securityReferences(securityReferences()) // 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes - .forPaths(PathSelectors.regex("^(?!auth).*$")) + .operationSelector(o -> o.requestMappingPattern().matches("^(?!auth).*$")) .build()); }