From e82792514b7793631ec59ffde5afd2e424d46f5b Mon Sep 17 00:00:00 2001 From: HzjNeverStop <441627022@qq.com> Date: Mon, 7 Aug 2023 16:49:56 +0800 Subject: [PATCH] remove SearchStrategy#CURRENT (#1220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 致节 --- .../startup/StartupHealthCheckStageConfiguration.java | 3 +-- .../startup/SofaStartupIsleAutoConfiguration.java | 5 ++--- .../SofaStartupHealthCheckAutoConfiguration.java | 3 +-- .../test/configuration/SofaStartupIsleAutoConfiguration.java | 5 ++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sofa-boot-project/sofa-boot-actuator-autoconfigure/src/main/java/com/alipay/sofa/boot/actuator/autoconfigure/startup/StartupHealthCheckStageConfiguration.java b/sofa-boot-project/sofa-boot-actuator-autoconfigure/src/main/java/com/alipay/sofa/boot/actuator/autoconfigure/startup/StartupHealthCheckStageConfiguration.java index c9c8fba47..fb98e97a9 100644 --- a/sofa-boot-project/sofa-boot-actuator-autoconfigure/src/main/java/com/alipay/sofa/boot/actuator/autoconfigure/startup/StartupHealthCheckStageConfiguration.java +++ b/sofa-boot-project/sofa-boot-actuator-autoconfigure/src/main/java/com/alipay/sofa/boot/actuator/autoconfigure/startup/StartupHealthCheckStageConfiguration.java @@ -29,7 +29,6 @@ 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.SearchStrategy; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; @@ -45,7 +44,7 @@ public class StartupHealthCheckStageConfiguration { @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") @Bean - @ConditionalOnMissingBean(value = ReadinessCheckListener.class, search = SearchStrategy.CURRENT) + @ConditionalOnMissingBean(value = ReadinessCheckListener.class) public StartupReadinessCheckListener startupReadinessCheckListener(Environment environment, HealthCheckerProcessor healthCheckerProcessor, HealthIndicatorProcessor healthIndicatorProcessor, diff --git a/sofa-boot-project/sofa-boot-autoconfigure/src/main/java/com/alipay/sofa/boot/autoconfigure/startup/SofaStartupIsleAutoConfiguration.java b/sofa-boot-project/sofa-boot-autoconfigure/src/main/java/com/alipay/sofa/boot/autoconfigure/startup/SofaStartupIsleAutoConfiguration.java index a6b51be32..675313d66 100644 --- a/sofa-boot-project/sofa-boot-autoconfigure/src/main/java/com/alipay/sofa/boot/autoconfigure/startup/SofaStartupIsleAutoConfiguration.java +++ b/sofa-boot-project/sofa-boot-autoconfigure/src/main/java/com/alipay/sofa/boot/autoconfigure/startup/SofaStartupIsleAutoConfiguration.java @@ -29,7 +29,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -46,7 +45,7 @@ public class SofaStartupIsleAutoConfiguration { @Bean - @ConditionalOnMissingBean(value = SpringContextInstallStage.class, search = SearchStrategy.CURRENT) + @ConditionalOnMissingBean(value = SpringContextInstallStage.class) public StartupSpringContextInstallStage startupSpringContextInstallStage(ApplicationContext applicationContext, SofaModuleProperties sofaModuleProperties, StartupReporter startupReporter) { @@ -55,7 +54,7 @@ public StartupSpringContextInstallStage startupSpringContextInstallStage(Applica } @Bean - @ConditionalOnMissingBean(value = ModelCreatingStage.class, search = SearchStrategy.CURRENT) + @ConditionalOnMissingBean(value = ModelCreatingStage.class) public StartupModelCreatingStage startupModelCreatingStage(ApplicationContext applicationContext, SofaModuleProperties sofaModuleProperties, SofaModuleProfileChecker sofaModuleProfileChecker, diff --git a/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupHealthCheckAutoConfiguration.java b/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupHealthCheckAutoConfiguration.java index 72215cc75..d133f1c8f 100644 --- a/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupHealthCheckAutoConfiguration.java +++ b/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupHealthCheckAutoConfiguration.java @@ -27,7 +27,6 @@ import com.alipay.sofa.startup.stage.healthcheck.StartupReadinessCheckListener; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; @@ -41,7 +40,7 @@ public class SofaStartupHealthCheckAutoConfiguration { @Bean - @ConditionalOnMissingBean(value = ReadinessCheckListener.class, search = SearchStrategy.CURRENT) + @ConditionalOnMissingBean(value = ReadinessCheckListener.class) public StartupReadinessCheckListener startupReadinessCheckListener(Environment environment, HealthCheckerProcessor healthCheckerProcessor, HealthIndicatorProcessor healthIndicatorProcessor, diff --git a/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupIsleAutoConfiguration.java b/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupIsleAutoConfiguration.java index 1e76efb2a..04f99fe4a 100644 --- a/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupIsleAutoConfiguration.java +++ b/sofa-boot-project/sofa-boot-core/startup-sofa-boot/src/test/java/com/alipay/sofa/startup/test/configuration/SofaStartupIsleAutoConfiguration.java @@ -40,7 +40,6 @@ import com.alipay.sofa.startup.test.stage.TestModelCreatingStage; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; @@ -59,7 +58,7 @@ public class SofaStartupIsleAutoConfiguration { @Bean - @ConditionalOnMissingBean(value = SpringContextInstallStage.class, search = SearchStrategy.CURRENT) + @ConditionalOnMissingBean(value = SpringContextInstallStage.class) public StartupSpringContextInstallStage startupSpringContextInstallStage(ApplicationContext applicationContext, SofaModuleProperties sofaModuleProperties, StartupReporter startupReporter) { @@ -68,7 +67,7 @@ public StartupSpringContextInstallStage startupSpringContextInstallStage(Applica } @Bean - @ConditionalOnMissingBean(value = ModelCreatingStage.class, search = SearchStrategy.CURRENT) + @ConditionalOnMissingBean(value = ModelCreatingStage.class) public StartupModelCreatingStage startupModelCreatingStage(ApplicationContext applicationContext, SofaModuleProperties sofaModuleProperties, SofaModuleProfileChecker sofaModuleProfileChecker,