SpringBoot如何实现自动装配_springboot 自动装配-CSDN博客

网站介绍:文章浏览阅读1w次,点赞8次,收藏32次。目录1、什么是自动配置1.1、引入redisTemplate1.2、引入transactionTemplate1.3、使用@ConfigurationProperties2、工作原理2.1、bean的自动配置2.2、属性的自动配置3、自动配置的生效条件1、什么是自动配置1.1、引入redisTemplate只要在pom.xml文件中引入 spring-boot-starter-data-redis-xxx.jar 包,然后只要在配置文件中配置redis连接,如:_springboot 自动装配