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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionspringUpdateCheckerConfigEnhancer(UsagePropertyProvider usagePropertyProvider) Bean creation method for aConfigurationEnhancerfor Spring-specificUpdateCheckercomponents.usagePropertyProvider(UpdateCheckerProperties properties)
-
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 aConfigurationEnhancerfor Spring-specificUpdateCheckercomponents.Although a duplicate of the
UpdateCheckerConfigurationEnhancer, this bean creation method provides a Spring-specific mechanism to expect the exactUsagePropertyProviderconstructed in this file (based on type and name). This allows us to construct the aUpdateCheckerHttpClientandUpdateCheckercomponents with the rightUsagePropertyProvider, including any lifecycle operations. As such we ensure that we do not have to add any component name in theUpdateCheckerConfigurationEnhancerto pick the Spring-specificUsagePropertyProviderconstructed by this autoconfiguration class.- Parameters:
usagePropertyProvider- TheUsagePropertyProviderto attach to theUpdateCheckerHttpClientandUpdateCheckerconstructed by thisConfigurationEnhancer.- Returns:
- A
ConfigurationEnhancerconstructing aUpdateCheckerHttpClientandUpdateCheckerbased on the givenusagePropertyProvider.
-