Class UpdateCheckerAutoConfiguration

java.lang.Object
org.axonframework.extension.springboot.autoconfig.UpdateCheckerAutoConfiguration

@AutoConfiguration @EnableConfigurationProperties(UpdateCheckerProperties.class) public class UpdateCheckerAutoConfiguration extends Object
Autoconfiguration class constructing the UsagePropertyProvider that will end up in the UpdateChecker.

The UsagePropertyProvider will not be constructed if this configuration spins up in a test environment.

Since:
4.12.0
Author:
Steven van Beelen
  • Constructor Details

    • UpdateCheckerAutoConfiguration

      public UpdateCheckerAutoConfiguration()
  • Method Details

    • usagePropertyProvider

      @Bean @ConditionalOnMissingBean @Conditional(org.axonframework.extension.springboot.autoconfig.UpdateCheckerAutoConfiguration.NotTestEnvironmentCondition.class) public UsagePropertyProvider usagePropertyProvider(UpdateCheckerProperties properties)
    • springUpdateCheckerConfigEnhancer

      @Bean @Conditional(org.axonframework.extension.springboot.autoconfig.UpdateCheckerAutoConfiguration.NotTestEnvironmentCondition.class) public ConfigurationEnhancer springUpdateCheckerConfigEnhancer(UsagePropertyProvider usagePropertyProvider)
      Bean creation method for a ConfigurationEnhancer for Spring-specific UpdateChecker components.

      Although a duplicate of the UpdateCheckerConfigurationEnhancer, this bean creation method provides a Spring-specific mechanism to expect the exact UsagePropertyProvider constructed in this file (based on type and name). This allows us to construct the a UpdateCheckerHttpClient and UpdateChecker components with the right UsagePropertyProvider, including any lifecycle operations. As such we ensure that we do not have to add any component name in the UpdateCheckerConfigurationEnhancer to pick the Spring-specific UsagePropertyProvider constructed by this autoconfiguration class.

      Parameters:
      usagePropertyProvider - The UsagePropertyProvider to attach to the UpdateCheckerHttpClient and UpdateChecker constructed by this ConfigurationEnhancer.
      Returns:
      A ConfigurationEnhancer constructing a UpdateCheckerHttpClient and UpdateChecker based on the given usagePropertyProvider.