SpringBoot为为什么可以直接使用RedisTemplate呢?
@Autowired
private RedisTemplate redisTemplate;
通过看源码可知通过RedisAutoConfiguration注入
那 RedisAutoConfiguration类是什么时候注入的呢?
程序起来后,通过
那spring-boot-autoconfigure包是什么时候引入的呢?
通过spring-boot-starter-data-redis 关联引入了spring-boot-autoconfigure
本文 基于springboot 1.5.14 讲解