@EnableConfigurationProperties(RedisProperties.class)
时间: 2023-10-15 07:31:20 浏览: 123
@EnableConfigurationProperties(RedisProperties.class)是一个注解,用于启用将指定的配置类作为属性配置的来源。在这个例子中,它被用于将RedisProperties作为属性配置注入到RedissonAndBloomConfig类中。这样一来,RedisProperties类中的属性就会根据配置文件中以"spring.redis"为前缀的属性进行赋值。通过使用@EnableConfigurationProperties(RedisProperties.class),我们可以在RedissonAndBloomConfig类中自动获取RedisProperties对象并使用它来配置RedissonClient对象。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [@ConfigurationProperties和@@EnableConfigurationProperties](https://blog.csdn.net/IT_tyro/article/details/122391626)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文