From cd449d2f377fcd9d9f2c42757ad7f0b84ddc8ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=A2=A6=E6=8A=80=E6=9C=AF?= <596392912@qq.com> Date: Tue, 18 May 2021 17:02:22 +0800 Subject: [PATCH] :sparkles: Use @Configuration(proxyBeanMethods = false) --- .../pig4cloud/pig/auth/config/AuthorizationServerConfig.java | 2 +- .../com/pig4cloud/pig/auth/config/WebSecurityConfigurer.java | 2 +- .../com/pig4cloud/pig/common/log/LogAutoConfiguration.java | 4 +--- .../pig/gateway/config/RateLimiterConfiguration.java | 2 +- .../pig4cloud/pig/monitor/config/WebSecurityConfigurer.java | 2 +- .../com/alibaba/csp/sentinel/dashboard/config/WebConfig.java | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfig.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfig.java index 72563a4f..13673e73 100755 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfig.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfig.java @@ -47,9 +47,9 @@ import java.util.Map; * @author lengleng * @date 2019/2/1 认证服务器配置 */ -@Configuration @RequiredArgsConstructor @EnableAuthorizationServer +@Configuration(proxyBeanMethods = false) public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter { private final DataSource dataSource; diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/WebSecurityConfigurer.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/WebSecurityConfigurer.java index 84553bd5..61ad65d1 100755 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/WebSecurityConfigurer.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/WebSecurityConfigurer.java @@ -38,7 +38,7 @@ import org.springframework.security.web.authentication.logout.LogoutSuccessHandl */ @Primary @Order(90) -@Configuration +@Configuration(proxyBeanMethods = false) public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter { @Override diff --git a/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/LogAutoConfiguration.java b/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/LogAutoConfiguration.java index 071c623c..ef0d1622 100755 --- a/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/LogAutoConfiguration.java +++ b/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/LogAutoConfiguration.java @@ -35,10 +35,8 @@ import org.springframework.scheduling.annotation.EnableAsync; @Configuration(proxyBeanMethods = false) public class LogAutoConfiguration { - private final RemoteLogService remoteLogService; - @Bean - public SysLogListener sysLogListener() { + public SysLogListener sysLogListener(RemoteLogService remoteLogService) { return new SysLogListener(remoteLogService); } diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/RateLimiterConfiguration.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/RateLimiterConfiguration.java index bbac3405..c6aff7df 100755 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/RateLimiterConfiguration.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/RateLimiterConfiguration.java @@ -25,7 +25,7 @@ import reactor.core.publisher.Mono; * @author lengleng * @date 2019/2/1 路由限流配置 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class RateLimiterConfiguration { @Bean(value = "remoteAddrKeyResolver") diff --git a/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/config/WebSecurityConfigurer.java b/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/config/WebSecurityConfigurer.java index aa49143d..46d345cd 100755 --- a/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/config/WebSecurityConfigurer.java +++ b/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/config/WebSecurityConfigurer.java @@ -29,7 +29,7 @@ import org.springframework.security.web.authentication.SavedRequestAwareAuthenti * @author lishangbu * @date 2019/2/1 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter { private final String adminContextPath; diff --git a/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/WebConfig.java b/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/WebConfig.java index 7a1256d0..e3329892 100755 --- a/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/WebConfig.java +++ b/pig-visual/pig-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/WebConfig.java @@ -42,7 +42,7 @@ import javax.servlet.Filter; /** * @author leyou */ -@Configuration +@Configuration(proxyBeanMethods = false) public class WebConfig implements WebMvcConfigurer { private final Logger logger = LoggerFactory.getLogger(WebConfig.class);