Redis实战开发

Springboot整合redis

1.1.需要引入jar

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

1.2. 编写配置类 ,设置redis服务器相关的配置

#redis服务器的IP地址
spring.redis.host=192.168.11.100
#redis的端口号
spring.redis.port=6379

 

原文地址:https://www.cnblogs.com/cwshuo/p/13403802.html