@AutoConfigureOrder(value=2147483647) @EnableConfigurationProperties(value=RedisRegistryProperties.class) public class RedisServerRegistryAutoConfiguration extends BaseServerRegistryAutoConfiguration
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
SPRING_BEAN_NAME_STRING_REDIS_TEMPLATE_WRAPPER
Redis registry StringRedisTemplate spring bean name
|
log| 构造器和说明 |
|---|
RedisServerRegistryAutoConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.commons.lang3.mutable.MutableObject<org.springframework.data.redis.core.StringRedisTemplate> |
stringRedisTemplateWrapper(org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)
RedisAutoConfiguration has auto-configured two redis template objects.
1) RedisTemplate
|
SupervisorRegistry |
supervisorRegistry(RedisRegistryProperties config,
org.springframework.web.client.RestTemplate restTemplate,
org.apache.commons.lang3.mutable.MutableObject<org.springframework.data.redis.core.StringRedisTemplate> stringRedisTemplateWrapper)
Configuration redis supervisor registry.
|
WorkerRegistry |
workerRegistry(RedisRegistryProperties config,
org.springframework.web.client.RestTemplate restTemplate,
org.apache.commons.lang3.mutable.MutableObject<org.springframework.data.redis.core.StringRedisTemplate> stringRedisTemplateWrapper)
Configuration redis worker registry.
|
@ConditionalOnMissingBean(name="disjob.bean.registry.redis.string-redis-template-wrapper") @Bean(value="disjob.bean.registry.redis.string-redis-template-wrapper") public org.apache.commons.lang3.mutable.MutableObject<org.springframework.data.redis.core.StringRedisTemplate> stringRedisTemplateWrapper(org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)
RedisAutoConfiguration has auto-configured two redis template objects. 1) RedisTemplate
stringRedisTemplate - the auto-configured redis template by spring container@ConditionalOnBean(value=cn.ponfee.disjob.core.base.Supervisor.Local.class) @Bean public SupervisorRegistry supervisorRegistry(RedisRegistryProperties config, @Qualifier(value="disjob.bean.rest-template") org.springframework.web.client.RestTemplate restTemplate, @Qualifier(value="disjob.bean.registry.redis.string-redis-template-wrapper") org.apache.commons.lang3.mutable.MutableObject<org.springframework.data.redis.core.StringRedisTemplate> stringRedisTemplateWrapper)
@ConditionalOnBean:如果注解没有入参,则默认以方法的返回类型判断,即容器中已存在类型为SupervisorRegistry的实例才创建
config - redis registry configurationrestTemplate - the rest templatestringRedisTemplateWrapper - the string redis template wrapperorg.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration@ConditionalOnBean(value=cn.ponfee.disjob.core.base.Worker.Local.class) @Bean public WorkerRegistry workerRegistry(RedisRegistryProperties config, @Qualifier(value="disjob.bean.rest-template") org.springframework.web.client.RestTemplate restTemplate, @Qualifier(value="disjob.bean.registry.redis.string-redis-template-wrapper") org.apache.commons.lang3.mutable.MutableObject<org.springframework.data.redis.core.StringRedisTemplate> stringRedisTemplateWrapper)
Copyright © 2024. All rights reserved.