Skip to content

Commit

Permalink
remove SearchStrategy#CURRENT (#1220)
Browse files Browse the repository at this point in the history
Co-authored-by: 致节 <[email protected]>
  • Loading branch information
HzjNeverStop and 致节 authored Aug 7, 2023
1 parent 312cd32 commit e827925
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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,
Expand Down

0 comments on commit e827925

Please sign in to comment.