从spring官网spring.io找到spring boot的文档
点击进入
找到需要的starter 复制进入pom
如redis
spring-boot-starter-data-redis
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
无需版本号,springboot 同意管理
引入后 idea Ctrol+N RedisAutoConfiguration 即可找到redis的自动配置
所有的属性都在RedisProperties中
配置文件加入简单配置即可
spring.redis.host=127.0.0.1
spring.redis.username=root
spring.redis.password=12345