diff --git a/README.md b/README.md
index 13d4946..85f1a44 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-
+
## SpringBlade微服务开发平台
diff --git a/blade-core-boot/pom.xml b/blade-core-boot/pom.xml
index 60f4ff3..e13582a 100644
--- a/blade-core-boot/pom.xml
+++ b/blade-core-boot/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-tool
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-boot/src/main/java/org/springblade/core/boot/config/MybatisPlusConfiguration.java b/blade-core-boot/src/main/java/org/springblade/core/boot/config/MybatisPlusConfiguration.java
index 0715dca..d81d8c2 100644
--- a/blade-core-boot/src/main/java/org/springblade/core/boot/config/MybatisPlusConfiguration.java
+++ b/blade-core-boot/src/main/java/org/springblade/core/boot/config/MybatisPlusConfiguration.java
@@ -15,7 +15,6 @@
*/
package org.springblade.core.boot.config;
-import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
@@ -60,14 +59,6 @@ public class MybatisPlusConfiguration {
return interceptor;
}
- /**
- * mybatis-plus自3.4.0起采用新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)
- */
- @Bean
- public ConfigurationCustomizer configurationCustomizer() {
- return configuration -> configuration.setUseDeprecatedExecutor(false);
- }
-
/**
* sql 日志
*
diff --git a/blade-core-boot/src/main/resources/bootstrap.yml b/blade-core-boot/src/main/resources/bootstrap.yml
index 1ea97cc..86a5f48 100644
--- a/blade-core-boot/src/main/resources/bootstrap.yml
+++ b/blade-core-boot/src/main/resources/bootstrap.yml
@@ -101,7 +101,7 @@ mybatis-plus:
swagger:
title: SpringBlade 接口文档系统
description: SpringBlade 接口文档系统
- version: 3.0.3
+ version: 3.1.0
license: Powered By SpringBlade
licenseUrl: https://bladex.vip
terms-of-service-url: https://bladex.vip
diff --git a/blade-core-cloud/pom.xml b/blade-core-cloud/pom.xml
index 60fcbfa..04851dd 100644
--- a/blade-core-cloud/pom.xml
+++ b/blade-core-cloud/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-cloud/src/main/java/org/springblade/core/cloud/client/BladeCloudApplication.java b/blade-core-cloud/src/main/java/org/springblade/core/cloud/client/BladeCloudApplication.java
index effe1d4..4d91887 100644
--- a/blade-core-cloud/src/main/java/org/springblade/core/cloud/client/BladeCloudApplication.java
+++ b/blade-core-cloud/src/main/java/org/springblade/core/cloud/client/BladeCloudApplication.java
@@ -17,9 +17,7 @@ package org.springblade.core.cloud.client;
import org.springblade.core.launch.constant.AppConstant;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import java.lang.annotation.*;
@@ -34,9 +32,8 @@ import java.lang.annotation.*;
@Documented
@Inherited
@EnableDiscoveryClient
-@EnableCircuitBreaker
@EnableFeignClients(AppConstant.BASE_PACKAGES)
-@SpringBootApplication(exclude = RibbonAutoConfiguration.class)
+@SpringBootApplication
public @interface BladeCloudApplication {
}
diff --git a/blade-core-cloud/src/main/java/org/springblade/core/cloud/feign/EnableBladeFeign.java b/blade-core-cloud/src/main/java/org/springblade/core/cloud/feign/EnableBladeFeign.java
index 30f9619..746ade2 100644
--- a/blade-core-cloud/src/main/java/org/springblade/core/cloud/feign/EnableBladeFeign.java
+++ b/blade-core-cloud/src/main/java/org/springblade/core/cloud/feign/EnableBladeFeign.java
@@ -19,7 +19,6 @@ package org.springblade.core.cloud.feign;
import org.springblade.core.launch.constant.AppConstant;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import java.lang.annotation.*;
@@ -33,7 +32,7 @@ import java.lang.annotation.*;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@EnableFeignClients(AppConstant.BASE_PACKAGES)
-@EnableAutoConfiguration(exclude = RibbonAutoConfiguration.class)
+@EnableAutoConfiguration
public @interface EnableBladeFeign {
/**
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation
diff --git a/blade-core-develop/pom.xml b/blade-core-develop/pom.xml
index f5c8333..ef29980 100644
--- a/blade-core-develop/pom.xml
+++ b/blade-core-develop/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
@@ -26,12 +26,6 @@
com.baomidou
mybatis-plus-generator
${mybatis.plus.generator.version}
-
-
- com.baomidou
- mybatis-plus-extension
-
-
com.baomidou
diff --git a/blade-core-launch/pom.xml b/blade-core-launch/pom.xml
index 20d42cd..4aa9651 100644
--- a/blade-core-launch/pom.xml
+++ b/blade-core-launch/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-launch/src/main/java/org/springblade/core/launch/constant/AppConstant.java b/blade-core-launch/src/main/java/org/springblade/core/launch/constant/AppConstant.java
index 6cbfaa3..a781d10 100644
--- a/blade-core-launch/src/main/java/org/springblade/core/launch/constant/AppConstant.java
+++ b/blade-core-launch/src/main/java/org/springblade/core/launch/constant/AppConstant.java
@@ -25,7 +25,7 @@ public interface AppConstant {
/**
* 应用版本
*/
- String APPLICATION_VERSION = "3.0.3";
+ String APPLICATION_VERSION = "3.1.0";
/**
* 基础包
diff --git a/blade-core-log/pom.xml b/blade-core-log/pom.xml
index 9dcc2d8..ecbf3d6 100644
--- a/blade-core-log/pom.xml
+++ b/blade-core-log/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-log/src/main/java/org/springblade/core/log/error/BladeErrorAttributes.java b/blade-core-log/src/main/java/org/springblade/core/log/error/BladeErrorAttributes.java
index 261869a..5e2f7da 100644
--- a/blade-core-log/src/main/java/org/springblade/core/log/error/BladeErrorAttributes.java
+++ b/blade-core-log/src/main/java/org/springblade/core/log/error/BladeErrorAttributes.java
@@ -20,6 +20,7 @@ import org.springblade.core.log.publisher.ErrorLogPublisher;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.api.ResultCode;
import org.springblade.core.tool.utils.BeanUtil;
+import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
import org.springframework.lang.Nullable;
import org.springframework.web.context.request.RequestAttributes;
@@ -36,7 +37,7 @@ import java.util.Map;
public class BladeErrorAttributes extends DefaultErrorAttributes {
@Override
- public Map getErrorAttributes(WebRequest webRequest, boolean includeStackTrace) {
+ public Map getErrorAttributes(WebRequest webRequest, ErrorAttributeOptions options) {
String requestUri = this.getAttr(webRequest, "javax.servlet.error.request_uri");
Integer status = this.getAttr(webRequest, "javax.servlet.error.status_code");
Throwable error = getError(webRequest);
diff --git a/blade-core-log/src/main/java/org/springblade/core/log/model/LogAbstract.java b/blade-core-log/src/main/java/org/springblade/core/log/model/LogAbstract.java
index 956d924..466d020 100644
--- a/blade-core-log/src/main/java/org/springblade/core/log/model/LogAbstract.java
+++ b/blade-core-log/src/main/java/org/springblade/core/log/model/LogAbstract.java
@@ -39,7 +39,7 @@ public class LogAbstract implements Serializable {
/**
* 主键id
*/
- @TableId(value = "id", type = IdType.ID_WORKER)
+ @TableId(value = "id", type = IdType.ASSIGN_ID)
protected Long id;
/**
diff --git a/blade-core-mybatis/pom.xml b/blade-core-mybatis/pom.xml
index a4a1d3f..954c352 100644
--- a/blade-core-mybatis/pom.xml
+++ b/blade-core-mybatis/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-mybatis/src/main/java/org/springblade/core/mp/support/Condition.java b/blade-core-mybatis/src/main/java/org/springblade/core/mp/support/Condition.java
index 198a199..e0c1e0c 100644
--- a/blade-core-mybatis/src/main/java/org/springblade/core/mp/support/Condition.java
+++ b/blade-core-mybatis/src/main/java/org/springblade/core/mp/support/Condition.java
@@ -17,11 +17,13 @@ package org.springblade.core.mp.support;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springblade.core.launch.constant.TokenConstant;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.StringUtil;
import java.util.Map;
@@ -40,8 +42,14 @@ public class Condition {
*/
public static IPage getPage(Query query) {
Page page = new Page<>(Func.toInt(query.getCurrent(), 1), Func.toInt(query.getSize(), 10));
- page.setAsc(Func.toStrArray(SqlKeyword.filter(query.getAscs())));
- page.setDesc(Func.toStrArray(SqlKeyword.filter(query.getDescs())));
+ String[] ascArr = Func.toStrArray(query.getAscs());
+ for (String asc : ascArr) {
+ page.addOrder(OrderItem.asc(StringUtil.cleanIdentifier(asc)));
+ }
+ String[] descArr = Func.toStrArray(query.getDescs());
+ for (String desc : descArr) {
+ page.addOrder(OrderItem.desc(StringUtil.cleanIdentifier(desc)));
+ }
return page;
}
diff --git a/blade-core-oss/pom.xml b/blade-core-oss/pom.xml
index 886538b..0f77f3e 100644
--- a/blade-core-oss/pom.xml
+++ b/blade-core-oss/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-report/pom.xml b/blade-core-report/pom.xml
index e75ccf6..dc287bf 100644
--- a/blade-core-report/pom.xml
+++ b/blade-core-report/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-secure/pom.xml b/blade-core-secure/pom.xml
index 784abc8..f649ca9 100644
--- a/blade-core-secure/pom.xml
+++ b/blade-core-secure/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-social/pom.xml b/blade-core-social/pom.xml
index 031e26a..06bd361 100644
--- a/blade-core-social/pom.xml
+++ b/blade-core-social/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-swagger/pom.xml b/blade-core-swagger/pom.xml
index 1781a64..b73ce41 100644
--- a/blade-core-swagger/pom.xml
+++ b/blade-core-swagger/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerProperties.java b/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerProperties.java
index 8ca5eb2..b437cc2 100644
--- a/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerProperties.java
+++ b/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerProperties.java
@@ -55,7 +55,7 @@ public class SwaggerProperties {
/**
* 版本
**/
- private String version = "3.0.3";
+ private String version = "3.1.0";
/**
* 许可证
**/
diff --git a/blade-core-test/pom.xml b/blade-core-test/pom.xml
index 1873d76..22d4bbe 100644
--- a/blade-core-test/pom.xml
+++ b/blade-core-test/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-tool
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-tool/pom.xml b/blade-core-tool/pom.xml
index dbc4192..c6516e8 100644
--- a/blade-core-tool/pom.xml
+++ b/blade-core-tool/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-tool
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java
index 2cdaf7b..fad31b5 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java
@@ -17,6 +17,7 @@ package org.springblade.core.tool.utils;
import org.springblade.core.tool.support.StrFormatter;
import org.springblade.core.tool.support.StrSpliter;
+import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.web.util.HtmlUtils;
@@ -299,6 +300,27 @@ public class StringUtil extends org.springframework.util.StringUtils {
return template2;
}
+ /**
+ * 获取标识符,用于参数清理
+ *
+ * @param param 参数
+ * @return 清理后的标识符
+ */
+ @Nullable
+ public static String cleanIdentifier(@Nullable String param) {
+ if (param == null) {
+ return null;
+ }
+ StringBuilder paramBuilder = new StringBuilder();
+ for (int i = 0; i < param.length(); i++) {
+ char c = param.charAt(i);
+ if (Character.isJavaIdentifierPart(c)) {
+ paramBuilder.append(c);
+ }
+ }
+ return paramBuilder.toString();
+ }
+
/**
* 切分字符串,不去除切分后每个元素两边的空白符,不去除空白项
*
diff --git a/blade-core-transaction/pom.xml b/blade-core-transaction/pom.xml
index 4f26727..8ef2d5b 100644
--- a/blade-core-transaction/pom.xml
+++ b/blade-core-transaction/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.0.3
+ 3.1.0
4.0.0
diff --git a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignBlockingLoadBalancerClient.java b/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignBlockingLoadBalancerClient.java
deleted file mode 100644
index 2bf6c56..0000000
--- a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignBlockingLoadBalancerClient.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.alibaba.cloud.seata.feign;
-
-import feign.Client;
-import feign.Request;
-import feign.Response;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerProperties;
-import org.springframework.cloud.loadbalancer.blocking.client.BlockingLoadBalancerClient;
-import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
-import org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient;
-
-import java.io.IOException;
-
-/**
- * 重写SeataFeignBlockingLoadBalancerClient以适配最新API
- *
- * @author Chill
- */
-public class SeataFeignBlockingLoadBalancerClient extends FeignBlockingLoadBalancerClient {
-
- public SeataFeignBlockingLoadBalancerClient(Client delegate,
- BlockingLoadBalancerClient loadBalancerClient,
- SeataFeignObjectWrapper seataFeignObjectWrapper,
- LoadBalancerProperties properties,
- LoadBalancerClientFactory loadBalancerClientFactory) {
- super((Client) seataFeignObjectWrapper.wrap(delegate), loadBalancerClient, properties, loadBalancerClientFactory);
- }
-
- @Override
- public Response execute(Request request, Request.Options options) throws IOException {
- return super.execute(request, options);
- }
-
-}
diff --git a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignClientAutoConfiguration.java b/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignClientAutoConfiguration.java
deleted file mode 100644
index d0fc70f..0000000
--- a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignClientAutoConfiguration.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2013-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.cloud.seata.feign;
-
-import feign.Client;
-import feign.Feign;
-import feign.Retryer;
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.cloud.feign.BladeFeignSentinel;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.boot.autoconfigure.AutoConfigureBefore;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerProperties;
-import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
-import org.springframework.cloud.openfeign.FeignAutoConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Scope;
-
-/**
- * 重写SeataFeignClientAutoConfiguration以适配最新API
- *
- * @author Chill
- */
-@Configuration(proxyBeanMethods = false)
-@ConditionalOnClass(Client.class)
-@AutoConfigureBefore(FeignAutoConfiguration.class)
-public class SeataFeignClientAutoConfiguration {
-
- @Bean
- @Scope("prototype")
- @ConditionalOnClass(name = "com.alibaba.csp.sentinel.SphU")
- @ConditionalOnProperty(name = "feign.sentinel.enabled", havingValue = "true")
- Feign.Builder feignSentinelBuilder(BeanFactory beanFactory) {
- return BladeFeignSentinel.builder().retryer(Retryer.NEVER_RETRY)
- .client(new SeataFeignClient(beanFactory));
- }
-
- @Bean
- @ConditionalOnMissingBean
- @Scope("prototype")
- Feign.Builder feignBuilder(BeanFactory beanFactory) {
- return SeataFeignBuilder.builder(beanFactory);
- }
-
- @Configuration(proxyBeanMethods = false)
- @RequiredArgsConstructor
- protected static class FeignBeanPostProcessorConfiguration {
- private final LoadBalancedRetryFactory loadBalancedRetryFactory;
- private final LoadBalancerProperties properties;
- private final LoadBalancerClientFactory loadBalancerClientFactory;
-
- @Bean
- SeataBeanPostProcessor seataBeanPostProcessor(SeataFeignObjectWrapper seataFeignObjectWrapper) {
- return new SeataBeanPostProcessor(seataFeignObjectWrapper);
- }
-
- @Bean
- SeataContextBeanPostProcessor seataContextBeanPostProcessor(BeanFactory beanFactory) {
- return new SeataContextBeanPostProcessor(beanFactory);
- }
-
- @Bean
- SeataFeignObjectWrapper seataFeignObjectWrapper(BeanFactory beanFactory) {
- return new SeataFeignObjectWrapper(beanFactory, loadBalancedRetryFactory, properties, loadBalancerClientFactory);
- }
-
- }
-}
diff --git a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignObjectWrapper.java b/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignObjectWrapper.java
deleted file mode 100644
index 436300f..0000000
--- a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataFeignObjectWrapper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2013-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.cloud.seata.feign;
-
-import feign.Client;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerProperties;
-import org.springframework.cloud.loadbalancer.blocking.client.BlockingLoadBalancerClient;
-import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
-import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
-import org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient;
-import org.springframework.cloud.openfeign.loadbalancer.RetryableFeignBlockingLoadBalancerClient;
-
-/**
- * 重写SeataFeignObjectWrapper以适配最新API
- *
- * @author Chill
- */
-public class SeataFeignObjectWrapper {
-
- private final BeanFactory beanFactory;
- private final LoadBalancedRetryFactory loadBalancedRetryFactory;
- private final LoadBalancerProperties properties;
- private final LoadBalancerClientFactory loadBalancerClientFactory;
-
- private SpringClientFactory springClientFactory;
-
- SeataFeignObjectWrapper(BeanFactory beanFactory, LoadBalancedRetryFactory loadBalancedRetryFactory, LoadBalancerProperties properties, LoadBalancerClientFactory loadBalancerClientFactory) {
- this.beanFactory = beanFactory;
- this.loadBalancedRetryFactory = loadBalancedRetryFactory;
- this.properties = properties;
- this.loadBalancerClientFactory = loadBalancerClientFactory;
- }
-
- Object wrap(Object bean) {
- if (bean instanceof Client && !(bean instanceof SeataFeignClient)) {
- if (bean instanceof FeignBlockingLoadBalancerClient) {
- FeignBlockingLoadBalancerClient client = (FeignBlockingLoadBalancerClient) bean;
- return new SeataFeignBlockingLoadBalancerClient(client.getDelegate(),
- beanFactory.getBean(BlockingLoadBalancerClient.class), this, properties, loadBalancerClientFactory);
- }
- if (bean instanceof RetryableFeignBlockingLoadBalancerClient) {
- RetryableFeignBlockingLoadBalancerClient client = (RetryableFeignBlockingLoadBalancerClient) bean;
- return new SeataRetryableFeignBlockingLoadBalancerClient(client.getDelegate(),
- beanFactory.getBean(BlockingLoadBalancerClient.class), this, loadBalancedRetryFactory, properties, loadBalancerClientFactory);
- }
- return new SeataFeignClient(this.beanFactory, (Client) bean);
- }
- return bean;
- }
-
- SpringClientFactory clientFactory() {
- if (this.springClientFactory == null) {
- this.springClientFactory = this.beanFactory
- .getBean(SpringClientFactory.class);
- }
- return this.springClientFactory;
- }
-
-}
diff --git a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataRetryableFeignBlockingLoadBalancerClient.java b/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataRetryableFeignBlockingLoadBalancerClient.java
deleted file mode 100644
index 31cc2dc..0000000
--- a/blade-core-transaction/src/main/java/com/alibaba/cloud/seata/feign/SeataRetryableFeignBlockingLoadBalancerClient.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2013-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.cloud.seata.feign;
-
-import feign.Client;
-import feign.Request;
-import feign.Response;
-import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerProperties;
-import org.springframework.cloud.loadbalancer.blocking.client.BlockingLoadBalancerClient;
-import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
-import org.springframework.cloud.openfeign.loadbalancer.RetryableFeignBlockingLoadBalancerClient;
-
-import java.io.IOException;
-
-/**
- * 拓展SeataRetryableFeignBlockingLoadBalancerClient以适配最新API
- *
- * @author Chill
- */
-public class SeataRetryableFeignBlockingLoadBalancerClient extends RetryableFeignBlockingLoadBalancerClient {
-
- public SeataRetryableFeignBlockingLoadBalancerClient(Client delegate,
- BlockingLoadBalancerClient loadBalancerClient,
- SeataFeignObjectWrapper seataFeignObjectWrapper,
- LoadBalancedRetryFactory loadBalancedRetryFactory,
- LoadBalancerProperties properties,
- LoadBalancerClientFactory loadBalancerClientFactory) {
- super((Client) seataFeignObjectWrapper.wrap(delegate), loadBalancerClient, loadBalancedRetryFactory, properties, loadBalancerClientFactory);
- }
-
- @Override
- public Response execute(Request request, Request.Options options) throws IOException {
- return super.execute(request, options);
- }
-}
diff --git a/blade-core-transaction/src/main/java/org/springblade/core/transaction/annotation/SeataCloudApplication.java b/blade-core-transaction/src/main/java/org/springblade/core/transaction/annotation/SeataCloudApplication.java
index edc3566..f40365c 100644
--- a/blade-core-transaction/src/main/java/org/springblade/core/transaction/annotation/SeataCloudApplication.java
+++ b/blade-core-transaction/src/main/java/org/springblade/core/transaction/annotation/SeataCloudApplication.java
@@ -17,9 +17,7 @@ package org.springblade.core.transaction.annotation;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration;
import java.lang.annotation.*;
@@ -33,8 +31,7 @@ import java.lang.annotation.*;
@Documented
@Inherited
@EnableDiscoveryClient
-@EnableCircuitBreaker
-@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, RibbonAutoConfiguration.class})
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public @interface SeataCloudApplication {
}
diff --git a/pom.xml b/pom.xml
index dfb5407..a1b49f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-tool
- 3.0.3
+ 3.1.0
pom
blade-tool
@@ -36,26 +36,26 @@
- 3.0.3
+ 3.1.0
1.8
3.8.0
2.10.5
1.6.2
2.0.8
- 3.4.2
+ 3.4.3.1
3.4.1
1.6.0
3.4.2
2.3.1
1.2.5
- 2.2.5.RELEASE
- 2.0.0
- 1.4.1
+ 2021.1
+ 2.0.2
+ 1.4.2
2.0.0.RELEASE
- 2.4.4
- 2020.0.2
+ 2.5.2
+ 2020.0.3
Cairo-SR8
UTF-8