objectMap) {
String entityName = tableInfo.getEntityName();
String entityNameLower = tableInfo.getEntityName().toLowerCase();
- customFile.forEach((key, value) -> {
- String outputPath = getPathInfo(OutputFile.other);
+ customFiles.forEach(customFile -> {
+ String key = customFile.getFileName();
+ String value = customFile.getTemplatePath();
+ String outputPath = getPathInfo(OutputFile.parent);
+ objectMap.put("entityKey", entityNameLower);
if (StringUtil.equals(key, "menu.sql")) {
- objectMap.put("entityKey", entityNameLower);
objectMap.put("menuId", IdWorker.getId());
objectMap.put("addMenuId", IdWorker.getId());
objectMap.put("editMenuId", IdWorker.getId());
diff --git a/blade-core-develop/src/main/resources/templates/controller.java.vm b/blade-core-develop/src/main/resources/templates/controller.java.vm
index a869a87..625090a 100644
--- a/blade-core-develop/src/main/resources/templates/controller.java.vm
+++ b/blade-core-develop/src/main/resources/templates/controller.java.vm
@@ -53,7 +53,7 @@ import $!{superControllerClassPackage};
*/
@RestController
@AllArgsConstructor
-@RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}")
+@RequestMapping("#if($!{hasServiceName})/$!{serviceName}#end/$!{entityKey}")
@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口")
#if($!{superControllerClass})
public class $!{table.controllerName} extends $!{superControllerClass} {
diff --git a/blade-core-launch/pom.xml b/blade-core-launch/pom.xml
index fd61098..39f3fbf 100644
--- a/blade-core-launch/pom.xml
+++ b/blade-core-launch/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-launch/src/main/java/org/springblade/core/launch/StartEventListener.java b/blade-core-launch/src/main/java/org/springblade/core/launch/StartEventListener.java
index 34d31a8..5da789b 100644
--- a/blade-core-launch/src/main/java/org/springblade/core/launch/StartEventListener.java
+++ b/blade-core-launch/src/main/java/org/springblade/core/launch/StartEventListener.java
@@ -16,8 +16,8 @@
package org.springblade.core.launch;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.web.context.WebServerInitializedEvent;
-import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.Environment;
@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
* @author Chill
*/
@Slf4j
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
public class StartEventListener {
@Async
diff --git a/blade-core-launch/src/main/java/org/springblade/core/launch/config/BladeLaunchConfiguration.java b/blade-core-launch/src/main/java/org/springblade/core/launch/config/BladeLaunchConfiguration.java
index 9bbb5c2..ac007d0 100644
--- a/blade-core-launch/src/main/java/org/springblade/core/launch/config/BladeLaunchConfiguration.java
+++ b/blade-core-launch/src/main/java/org/springblade/core/launch/config/BladeLaunchConfiguration.java
@@ -17,8 +17,8 @@ package org.springblade.core.launch.config;
import lombok.AllArgsConstructor;
import org.springblade.core.launch.props.BladeProperties;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
@@ -27,7 +27,7 @@ import org.springframework.core.annotation.Order;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@Order(Ordered.HIGHEST_PRECEDENCE)
@EnableConfigurationProperties({
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 5d00ef2..1ba6339 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.3.1";
+ String APPLICATION_VERSION = "3.4.0";
/**
* 基础包
diff --git a/blade-core-launch/src/main/java/org/springblade/core/launch/server/ServerInfo.java b/blade-core-launch/src/main/java/org/springblade/core/launch/server/ServerInfo.java
index 176db96..1fa02d9 100644
--- a/blade-core-launch/src/main/java/org/springblade/core/launch/server/ServerInfo.java
+++ b/blade-core-launch/src/main/java/org/springblade/core/launch/server/ServerInfo.java
@@ -19,8 +19,8 @@ import lombok.Getter;
import org.springblade.core.launch.utils.INetUtil;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.context.annotation.Configuration;
/**
* 服务器信息
@@ -28,7 +28,7 @@ import org.springframework.context.annotation.Configuration;
* @author Chill
*/
@Getter
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
public class ServerInfo implements SmartInitializingSingleton {
private final ServerProperties serverProperties;
private String hostName;
diff --git a/blade-core-loadbalancer/pom.xml b/blade-core-loadbalancer/pom.xml
new file mode 100644
index 0000000..5f3bae7
--- /dev/null
+++ b/blade-core-loadbalancer/pom.xml
@@ -0,0 +1,75 @@
+
+
+
+ blade-tool
+ org.springblade
+ 3.4.0
+
+
+ 4.0.0
+
+ blade-core-loadbalancer
+ ${project.artifactId}
+ ${blade.tool.version}
+ jar
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+
+
+
+ io.github.openfeign
+ feign-okhttp
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.nacos
+ nacos-client
+
+
+ ${alibaba.cloud.version}
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ com.alibaba.nacos
+ nacos-client
+
+
+ ${alibaba.cloud.version}
+
+
+ com.alibaba.nacos
+ nacos-client
+ ${alibaba.nacos.version}
+
+
+
+ org.springframework
+ spring-web
+ provided
+
+
+
+ org.springframework
+ spring-webflux
+ provided
+
+
+
+
diff --git a/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/config/BladeLoadBalancerConfiguration.java b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/config/BladeLoadBalancerConfiguration.java
new file mode 100644
index 0000000..7f6c2b2
--- /dev/null
+++ b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/config/BladeLoadBalancerConfiguration.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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 org.springblade.core.loadbalancer.config;
+
+import org.springblade.core.loadbalancer.props.BladeLoadBalancerProperties;
+import org.springblade.core.loadbalancer.rule.GrayscaleLoadBalancer;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.client.ServiceInstance;
+import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientConfiguration;
+import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientSpecification;
+import org.springframework.cloud.loadbalancer.core.ReactorLoadBalancer;
+import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
+import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.core.annotation.Order;
+import org.springframework.core.env.Environment;
+
+/**
+ * blade 负载均衡策略
+ *
+ * @author Chill
+ */
+@AutoConfiguration
+@AutoConfigureBefore(LoadBalancerClientConfiguration.class)
+@EnableConfigurationProperties(BladeLoadBalancerProperties.class)
+@ConditionalOnProperty(value = BladeLoadBalancerProperties.PROPERTIES_PREFIX + ".enabled", matchIfMissing = true)
+@Order(BladeLoadBalancerConfiguration.REACTIVE_SERVICE_INSTANCE_SUPPLIER_ORDER)
+public class BladeLoadBalancerConfiguration {
+ public static final int REACTIVE_SERVICE_INSTANCE_SUPPLIER_ORDER = 193827465;
+
+ @Bean
+ public ReactorLoadBalancer reactorServiceInstanceLoadBalancer(Environment environment,
+ LoadBalancerClientFactory loadBalancerClientFactory,
+ BladeLoadBalancerProperties bladeLoadBalancerProperties) {
+ String name = environment.getProperty(LoadBalancerClientFactory.PROPERTY_NAME);
+ return new GrayscaleLoadBalancer(loadBalancerClientFactory.getLazyProvider(name, ServiceInstanceListSupplier.class), bladeLoadBalancerProperties);
+ }
+
+ @Bean
+ public LoadBalancerClientSpecification loadBalancerClientSpecification() {
+ return new LoadBalancerClientSpecification("default.bladeLoadBalancerConfiguration",
+ new Class[]{BladeLoadBalancerConfiguration.class});
+ }
+
+}
diff --git a/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/constant/LoadBalancerConstant.java b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/constant/LoadBalancerConstant.java
new file mode 100644
index 0000000..e53bd49
--- /dev/null
+++ b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/constant/LoadBalancerConstant.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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 org.springblade.core.loadbalancer.constant;
+
+/**
+ * LoadBalancer 常量
+ *
+ * @author Chill
+ */
+public interface LoadBalancerConstant {
+
+ /**
+ * 灰度服务的请求头参数
+ */
+ String VERSION_NAME = "version";
+
+}
diff --git a/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/props/BladeLoadBalancerProperties.java b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/props/BladeLoadBalancerProperties.java
new file mode 100644
index 0000000..d32a45c
--- /dev/null
+++ b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/props/BladeLoadBalancerProperties.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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 org.springblade.core.loadbalancer.props;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * LoadBalancer 配置
+ *
+ * @author Chill
+ */
+@Getter
+@Setter
+@RefreshScope
+@ConfigurationProperties(BladeLoadBalancerProperties.PROPERTIES_PREFIX)
+public class BladeLoadBalancerProperties {
+ public static final String PROPERTIES_PREFIX = "blade.loadbalancer";
+
+ /**
+ * 是否开启自定义负载均衡
+ */
+ private boolean enabled = true;
+ /**
+ * 灰度服务版本
+ */
+ private String version;
+ /**
+ * 优先的ip列表,支持通配符,例如:10.20.0.8*、10.20.0.*
+ */
+ private List priorIpPattern = new ArrayList<>();
+
+}
diff --git a/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/rule/GrayscaleEnvPostProcessor.java b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/rule/GrayscaleEnvPostProcessor.java
new file mode 100644
index 0000000..50218aa
--- /dev/null
+++ b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/rule/GrayscaleEnvPostProcessor.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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 org.springblade.core.loadbalancer.rule;
+
+import net.dreamlu.mica.auto.annotation.AutoEnvPostProcessor;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.env.EnvironmentPostProcessor;
+import org.springframework.core.Ordered;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.util.StringUtils;
+
+/**
+ * 灰度版本 自动处理
+ *
+ * @author Chill
+ */
+@AutoEnvPostProcessor
+public class GrayscaleEnvPostProcessor implements EnvironmentPostProcessor, Ordered {
+ private static final String GREYSCALE_KEY = "blade.loadbalancer.version";
+ private static final String METADATA_KEY = "spring.cloud.nacos.discovery.metadata.version";
+
+ @Override
+ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
+ String version = environment.getProperty(GREYSCALE_KEY);
+
+ if (StringUtils.hasText(version)) {
+ environment.getSystemProperties().put(METADATA_KEY, version);
+ }
+ }
+
+ @Override
+ public int getOrder() {
+ return Ordered.LOWEST_PRECEDENCE;
+ }
+
+}
diff --git a/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/rule/GrayscaleLoadBalancer.java b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/rule/GrayscaleLoadBalancer.java
new file mode 100644
index 0000000..c946444
--- /dev/null
+++ b/blade-core-loadbalancer/src/main/java/org/springblade/core/loadbalancer/rule/GrayscaleLoadBalancer.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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 org.springblade.core.loadbalancer.rule;
+
+import com.alibaba.nacos.common.utils.StringUtils;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.loadbalancer.props.BladeLoadBalancerProperties;
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.cloud.client.ServiceInstance;
+import org.springframework.cloud.client.loadbalancer.*;
+import org.springframework.cloud.loadbalancer.core.NoopServiceInstanceListSupplier;
+import org.springframework.cloud.loadbalancer.core.ReactorServiceInstanceLoadBalancer;
+import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.PatternMatchUtils;
+import reactor.core.publisher.Mono;
+
+import java.util.List;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.stream.Collectors;
+
+import static org.springblade.core.loadbalancer.constant.LoadBalancerConstant.VERSION_NAME;
+
+/**
+ * LoadBalancer 负载规则
+ *
+ * @author Chill
+ */
+@Slf4j
+@RequiredArgsConstructor
+public class GrayscaleLoadBalancer implements ReactorServiceInstanceLoadBalancer {
+ private final ObjectProvider serviceInstanceListSupplierProvider;
+ private final BladeLoadBalancerProperties bladeLoadBalancerProperties;
+
+ @Override
+ public Mono> choose(Request request) {
+ ServiceInstanceListSupplier supplier = serviceInstanceListSupplierProvider
+ .getIfAvailable(NoopServiceInstanceListSupplier::new);
+ return supplier.get(request).next()
+ .map(serviceInstances -> getInstanceResponse(serviceInstances, request));
+ }
+
+ /**
+ * 自定义节点规则返回目标节点
+ */
+ private Response getInstanceResponse(List instances, Request request) {
+ // 注册中心无可用实例 返回空
+ if (CollectionUtils.isEmpty(instances)) {
+ return new EmptyResponse();
+ }
+ // 指定ip则返回满足ip的服务
+ List priorIpPattern = bladeLoadBalancerProperties.getPriorIpPattern();
+ if (!priorIpPattern.isEmpty()) {
+ String[] priorIpPatterns = priorIpPattern.toArray(new String[0]);
+ List priorIpInstances = instances.stream().filter(
+ (i -> PatternMatchUtils.simpleMatch(priorIpPatterns, i.getHost()))
+ ).collect(Collectors.toList());
+ if (!priorIpInstances.isEmpty()) {
+ instances = priorIpInstances;
+ }
+ }
+
+ // 获取灰度版本号
+ DefaultRequestContext context = (DefaultRequestContext) request.getContext();
+ RequestData requestData = (RequestData) context.getClientRequest();
+ HttpHeaders headers = requestData.getHeaders();
+ String versionName = headers.getFirst(VERSION_NAME);
+
+ // 没有指定灰度版本则返回正式的服务
+ if (StringUtils.isBlank(versionName)) {
+ List noneGrayscaleInstances = instances.stream().filter(
+ i -> !i.getMetadata().containsKey(VERSION_NAME)
+ ).collect(Collectors.toList());
+ return randomInstance(noneGrayscaleInstances);
+ }
+
+ // 指定灰度版本则返回标记的服务
+ List grayscaleInstances = instances.stream().filter(i -> {
+ String versionNameInMetadata = i.getMetadata().get(VERSION_NAME);
+ return StringUtils.equalsIgnoreCase(versionNameInMetadata, versionName);
+ }).collect(Collectors.toList());
+ return randomInstance(grayscaleInstances);
+ }
+
+ /**
+ * 采用随机规则返回
+ */
+ private Response randomInstance(List instances) {
+ // 若没有可用节点则返回空
+ if (instances.isEmpty()) {
+ return new EmptyResponse();
+ }
+
+ // 挑选随机节点返回
+ int randomIndex = ThreadLocalRandom.current().nextInt(instances.size());
+ ServiceInstance instance = instances.get(randomIndex % instances.size());
+ return new DefaultResponse(instance);
+ }
+}
diff --git a/blade-core-log/pom.xml b/blade-core-log/pom.xml
index 87b77cc..17e42a7 100644
--- a/blade-core-log/pom.xml
+++ b/blade-core-log/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-log/src/main/java/org/springblade/core/log/config/BladeErrorMvcAutoConfiguration.java b/blade-core-log/src/main/java/org/springblade/core/log/config/BladeErrorMvcAutoConfiguration.java
index 5221f11..7490d61 100644
--- a/blade-core-log/src/main/java/org/springblade/core/log/config/BladeErrorMvcAutoConfiguration.java
+++ b/blade-core-log/src/main/java/org/springblade/core/log/config/BladeErrorMvcAutoConfiguration.java
@@ -19,6 +19,7 @@ package org.springblade.core.log.config;
import lombok.AllArgsConstructor;
import org.springblade.core.log.error.BladeErrorAttributes;
import org.springblade.core.log.error.BladeErrorController;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -31,7 +32,6 @@ import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
import org.springframework.boot.web.servlet.error.ErrorAttributes;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;
import javax.servlet.Servlet;
@@ -41,7 +41,7 @@ import javax.servlet.Servlet;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@ConditionalOnWebApplication
@AutoConfigureBefore(ErrorMvcAutoConfiguration.class)
diff --git a/blade-core-log/src/main/java/org/springblade/core/log/config/BladeLogToolAutoConfiguration.java b/blade-core-log/src/main/java/org/springblade/core/log/config/BladeLogToolAutoConfiguration.java
index 062a655..1627f6b 100644
--- a/blade-core-log/src/main/java/org/springblade/core/log/config/BladeLogToolAutoConfiguration.java
+++ b/blade-core-log/src/main/java/org/springblade/core/log/config/BladeLogToolAutoConfiguration.java
@@ -17,24 +17,24 @@
package org.springblade.core.log.config;
import lombok.AllArgsConstructor;
-import org.springblade.core.log.aspect.ApiLogAspect;
-import org.springblade.core.log.event.ApiLogListener;
-import org.springblade.core.log.event.UsualLogListener;
-import org.springblade.core.log.event.ErrorLogListener;
-import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.launch.props.BladeProperties;
import org.springblade.core.launch.server.ServerInfo;
+import org.springblade.core.log.aspect.ApiLogAspect;
+import org.springblade.core.log.event.ApiLogListener;
+import org.springblade.core.log.event.ErrorLogListener;
+import org.springblade.core.log.event.UsualLogListener;
import org.springblade.core.log.feign.ILogClient;
+import org.springblade.core.log.logger.BladeLogger;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
/**
* 日志工具自动配置
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@ConditionalOnWebApplication
public class BladeLogToolAutoConfiguration {
diff --git a/blade-core-log/src/main/java/org/springblade/core/log/error/BladeRestExceptionTranslator.java b/blade-core-log/src/main/java/org/springblade/core/log/error/BladeRestExceptionTranslator.java
index cdee69e..881b881 100644
--- a/blade-core-log/src/main/java/org/springblade/core/log/error/BladeRestExceptionTranslator.java
+++ b/blade-core-log/src/main/java/org/springblade/core/log/error/BladeRestExceptionTranslator.java
@@ -25,9 +25,9 @@ import org.springblade.core.tool.api.ResultCode;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.UrlUtil;
import org.springblade.core.tool.utils.WebUtil;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.validation.BindException;
@@ -55,7 +55,7 @@ import java.util.Set;
* @author Chill
*/
@Slf4j
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@ConditionalOnClass({Servlet.class, DispatcherServlet.class})
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@RestControllerAdvice
diff --git a/blade-core-mybatis/pom.xml b/blade-core-mybatis/pom.xml
index f708f9f..b792d16 100644
--- a/blade-core-mybatis/pom.xml
+++ b/blade-core-mybatis/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-mybatis/src/main/java/org/springblade/core/mp/config/MybatisPlusConfiguration.java b/blade-core-mybatis/src/main/java/org/springblade/core/mp/config/MybatisPlusConfiguration.java
index 645216d..22ae208 100644
--- a/blade-core-mybatis/src/main/java/org/springblade/core/mp/config/MybatisPlusConfiguration.java
+++ b/blade-core-mybatis/src/main/java/org/springblade/core/mp/config/MybatisPlusConfiguration.java
@@ -31,11 +31,11 @@ import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
/**
@@ -43,7 +43,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@MapperScan("org.springblade.**.mapper.**")
@EnableConfigurationProperties(MybatisPlusProperties.class)
diff --git a/blade-core-oss/pom.xml b/blade-core-oss/pom.xml
index 1fde727..0fa60c1 100644
--- a/blade-core-oss/pom.xml
+++ b/blade-core-oss/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-oss/src/main/java/org/springblade/core/oss/config/AliossConfiguration.java b/blade-core-oss/src/main/java/org/springblade/core/oss/config/AliossConfiguration.java
index cc9f8d6..661d94e 100644
--- a/blade-core-oss/src/main/java/org/springblade/core/oss/config/AliossConfiguration.java
+++ b/blade-core-oss/src/main/java/org/springblade/core/oss/config/AliossConfiguration.java
@@ -24,20 +24,20 @@ import org.springblade.core.oss.AliossTemplate;
import org.springblade.core.oss.props.OssProperties;
import org.springblade.core.oss.rule.BladeOssRule;
import org.springblade.core.oss.rule.OssRule;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
/**
* Alioss配置类
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@AutoConfigureAfter(QiniuConfiguration.class)
@EnableConfigurationProperties(OssProperties.class)
diff --git a/blade-core-oss/src/main/java/org/springblade/core/oss/config/QiniuConfiguration.java b/blade-core-oss/src/main/java/org/springblade/core/oss/config/QiniuConfiguration.java
index 8bd1b5d..0d64a9c 100644
--- a/blade-core-oss/src/main/java/org/springblade/core/oss/config/QiniuConfiguration.java
+++ b/blade-core-oss/src/main/java/org/springblade/core/oss/config/QiniuConfiguration.java
@@ -24,19 +24,19 @@ import org.springblade.core.oss.QiniuTemplate;
import org.springblade.core.oss.props.OssProperties;
import org.springblade.core.oss.rule.BladeOssRule;
import org.springblade.core.oss.rule.OssRule;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
/**
* Oss配置类
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@EnableConfigurationProperties(OssProperties.class)
@ConditionalOnProperty(value = "oss.name", havingValue = "qiniu")
diff --git a/blade-core-report/pom.xml b/blade-core-report/pom.xml
index 381c632..a54e55c 100644
--- a/blade-core-report/pom.xml
+++ b/blade-core-report/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-report/src/main/java/org/springblade/core/report/config/ReportConfiguration.java b/blade-core-report/src/main/java/org/springblade/core/report/config/ReportConfiguration.java
index 18f5d68..a2c7c03 100644
--- a/blade-core-report/src/main/java/org/springblade/core/report/config/ReportConfiguration.java
+++ b/blade-core-report/src/main/java/org/springblade/core/report/config/ReportConfiguration.java
@@ -23,12 +23,12 @@ import org.springblade.core.report.props.ReportProperties;
import org.springblade.core.report.provider.DatabaseProvider;
import org.springblade.core.report.provider.ReportPlaceholderProvider;
import org.springblade.core.report.service.IReportFileService;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.core.annotation.Order;
@@ -40,7 +40,7 @@ import javax.servlet.Servlet;
* @author Chill
*/
@Order
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@ConditionalOnProperty(value = "report.enabled", havingValue = "true", matchIfMissing = true)
@EnableConfigurationProperties({ReportProperties.class, ReportDatabaseProperties.class})
@ImportResource("classpath:ureport-console-context.xml")
diff --git a/blade-core-secure/pom.xml b/blade-core-secure/pom.xml
index cd1d68c..eabf8b8 100644
--- a/blade-core-secure/pom.xml
+++ b/blade-core-secure/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-secure/src/main/java/org/springblade/core/secure/config/RegistryConfiguration.java b/blade-core-secure/src/main/java/org/springblade/core/secure/config/RegistryConfiguration.java
index d3b5a23..bdfc18c 100644
--- a/blade-core-secure/src/main/java/org/springblade/core/secure/config/RegistryConfiguration.java
+++ b/blade-core-secure/src/main/java/org/springblade/core/secure/config/RegistryConfiguration.java
@@ -17,10 +17,10 @@ package org.springblade.core.secure.config;
import org.springblade.core.secure.registry.SecureRegistry;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
/**
@@ -29,7 +29,7 @@ import org.springframework.core.annotation.Order;
* @author Chill
*/
@Order
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AutoConfigureBefore(SecureConfiguration.class)
public class RegistryConfiguration {
diff --git a/blade-core-secure/src/main/java/org/springblade/core/secure/config/SecureConfiguration.java b/blade-core-secure/src/main/java/org/springblade/core/secure/config/SecureConfiguration.java
index 5334ccf..2e06e06 100644
--- a/blade-core-secure/src/main/java/org/springblade/core/secure/config/SecureConfiguration.java
+++ b/blade-core-secure/src/main/java/org/springblade/core/secure/config/SecureConfiguration.java
@@ -24,10 +24,10 @@ import org.springblade.core.secure.props.BladeSecureProperties;
import org.springblade.core.secure.provider.ClientDetailsServiceImpl;
import org.springblade.core.secure.provider.IClientDetailsService;
import org.springblade.core.secure.registry.SecureRegistry;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@@ -39,7 +39,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
* @author Chill
*/
@Order
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@EnableConfigurationProperties({BladeSecureProperties.class})
public class SecureConfiguration implements WebMvcConfigurer {
diff --git a/blade-core-social/pom.xml b/blade-core-social/pom.xml
index 137c624..bc9640c 100644
--- a/blade-core-social/pom.xml
+++ b/blade-core-social/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-social/src/main/java/org/springblade/core/social/config/SocialConfiguration.java b/blade-core-social/src/main/java/org/springblade/core/social/config/SocialConfiguration.java
index b6d93b6..0a06a8a 100644
--- a/blade-core-social/src/main/java/org/springblade/core/social/config/SocialConfiguration.java
+++ b/blade-core-social/src/main/java/org/springblade/core/social/config/SocialConfiguration.java
@@ -19,17 +19,17 @@ import com.xkcoding.http.HttpUtil;
import com.xkcoding.http.support.Http;
import com.xkcoding.http.support.httpclient.HttpClientImpl;
import org.springblade.core.social.props.SocialProperties;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
/**
* SocialConfiguration
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@EnableConfigurationProperties(SocialProperties.class)
public class SocialConfiguration {
diff --git a/blade-core-swagger/pom.xml b/blade-core-swagger/pom.xml
index 7028ed4..34efeb6 100644
--- a/blade-core-swagger/pom.xml
+++ b/blade-core-swagger/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerAutoConfiguration.java b/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerAutoConfiguration.java
index 31f2123..0d8c13c 100644
--- a/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerAutoConfiguration.java
+++ b/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerAutoConfiguration.java
@@ -20,10 +20,10 @@ import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springblade.core.launch.props.BladeProperties;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.builders.ApiInfoBuilder;
@@ -44,7 +44,7 @@ import java.util.List;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@EnableSwagger
@EnableConfigurationProperties(SwaggerProperties.class)
@Import(BeanValidatorPluginsConfiguration.class)
diff --git a/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerHandlerConfiguration.java b/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerHandlerConfiguration.java
index c08c6e5..0cc081b 100644
--- a/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerHandlerConfiguration.java
+++ b/blade-core-swagger/src/main/java/org/springblade/core/swagger/SwaggerHandlerConfiguration.java
@@ -17,8 +17,8 @@ package org.springblade.core.swagger;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
public class SwaggerHandlerConfiguration {
@Bean
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 2645d46..07c9a3c 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.3.1";
+ private String version = "3.4.0";
/**
* 许可证
**/
diff --git a/blade-core-test/pom.xml b/blade-core-test/pom.xml
index dcb5d7b..09f950f 100644
--- a/blade-core-test/pom.xml
+++ b/blade-core-test/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-tool
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-tool/pom.xml b/blade-core-tool/pom.xml
index 0ae04c4..dadc4f9 100644
--- a/blade-core-tool/pom.xml
+++ b/blade-core-tool/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-tool
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/config/JacksonConfiguration.java b/blade-core-tool/src/main/java/org/springblade/core/tool/config/JacksonConfiguration.java
index a5b0058..50386ae 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/config/JacksonConfiguration.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/config/JacksonConfiguration.java
@@ -23,11 +23,11 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.jackson.BladeJavaTimeModule;
import org.springblade.core.tool.utils.DateUtil;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
@@ -41,7 +41,7 @@ import java.util.TimeZone;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@ConditionalOnClass(ObjectMapper.class)
@AutoConfigureBefore(JacksonAutoConfiguration.class)
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/config/MessageConfiguration.java b/blade-core-tool/src/main/java/org/springblade/core/tool/config/MessageConfiguration.java
index 51fb28c..1997103 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/config/MessageConfiguration.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/config/MessageConfiguration.java
@@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.jackson.MappingApiJackson2HttpMessageConverter;
import org.springblade.core.tool.utils.Charsets;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.converter.*;
@@ -34,7 +34,7 @@ import java.util.List;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@Order(Ordered.HIGHEST_PRECEDENCE)
public class MessageConfiguration implements WebMvcConfigurer {
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/config/RedisTemplateConfiguration.java b/blade-core-tool/src/main/java/org/springblade/core/tool/config/RedisTemplateConfiguration.java
index 5f0ee66..380ab08 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/config/RedisTemplateConfiguration.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/config/RedisTemplateConfiguration.java
@@ -17,6 +17,7 @@ package org.springblade.core.tool.config;
import org.springblade.core.tool.redis.RedisKeySerializer;
import org.springblade.core.tool.utils.RedisUtil;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -24,7 +25,6 @@ import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.cache.RedisCacheWriter;
@@ -41,7 +41,7 @@ import java.time.Duration;
* @author Chill
*/
@EnableCaching
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AutoConfigureBefore(RedisAutoConfiguration.class)
public class RedisTemplateConfiguration {
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/config/RequestConfiguration.java b/blade-core-tool/src/main/java/org/springblade/core/tool/config/RequestConfiguration.java
index 2dd4f6d..1289bf9 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/config/RequestConfiguration.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/config/RequestConfiguration.java
@@ -19,10 +19,10 @@ import lombok.AllArgsConstructor;
import org.springblade.core.tool.request.BladeRequestFilter;
import org.springblade.core.tool.request.RequestProperties;
import org.springblade.core.tool.request.XssProperties;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import javax.servlet.DispatcherType;
@@ -32,7 +32,7 @@ import javax.servlet.DispatcherType;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@AllArgsConstructor
@EnableConfigurationProperties({RequestProperties.class, XssProperties.class})
public class RequestConfiguration {
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/config/ToolConfiguration.java b/blade-core-tool/src/main/java/org/springblade/core/tool/config/ToolConfiguration.java
index 9dfc257..a9adc0e 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/config/ToolConfiguration.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/config/ToolConfiguration.java
@@ -17,8 +17,8 @@ package org.springblade.core.tool.config;
import org.springblade.core.tool.utils.SpringUtil;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -28,7 +28,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
@Order(Ordered.HIGHEST_PRECEDENCE)
public class ToolConfiguration implements WebMvcConfigurer {
diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/CacheUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/CacheUtil.java
index 8d01329..0dfcb7d 100644
--- a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/CacheUtil.java
+++ b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/CacheUtil.java
@@ -1,18 +1,17 @@
-/*
- * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the dreamlu.net developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: Chill 庄骞 (smallchill@163.com)
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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 org.springblade.core.tool.utils;
diff --git a/blade-core-transaction/pom.xml b/blade-core-transaction/pom.xml
index 727b28a..acf9543 100644
--- a/blade-core-transaction/pom.xml
+++ b/blade-core-transaction/pom.xml
@@ -5,7 +5,7 @@
blade-tool
org.springblade
- 3.3.1
+ 3.4.0
4.0.0
diff --git a/blade-core-transaction/src/main/java/org/springblade/core/transaction/config/DataSourceConfiguration.java b/blade-core-transaction/src/main/java/org/springblade/core/transaction/config/DataSourceConfiguration.java
index a6cfb48..e5c875e 100644
--- a/blade-core-transaction/src/main/java/org/springblade/core/transaction/config/DataSourceConfiguration.java
+++ b/blade-core-transaction/src/main/java/org/springblade/core/transaction/config/DataSourceConfiguration.java
@@ -15,14 +15,14 @@
*/
package org.springblade.core.transaction.config;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
/**
* 分布式事务数据源配置
*
* @author Chill
*/
-@Configuration(proxyBeanMethods = false)
+@AutoConfiguration
public class DataSourceConfiguration {
}
diff --git a/pom.xml b/pom.xml
index d987360..88eac72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-tool
- 3.3.1
+ 3.4.0
pom
blade-tool
@@ -36,27 +36,27 @@
- 3.3.1
+ 3.4.0
1.8
3.8.1
2.10.5
1.6.2
2.0.9
- 3.5.1
- 3.5.2
+ 3.5.2
+ 3.5.3
1.6.0
3.4.2
20.0
- 2.6.2
+ 2.7.1
1.2.5
2021.0.1.0
- 2.0.4
- 1.4.2
+ 2.1.0
+ 1.5.1.1
2.0.0.RELEASE
- 2.6.6
- 2021.0.1
+ 2.7.1
+ 2021.0.3
Cairo-SR8
UTF-8
@@ -68,6 +68,7 @@
blade-core-cloud
blade-core-develop
blade-core-launch
+ blade-core-loadbalancer
blade-core-log
blade-core-mybatis
blade-core-secure