springboot集成redis(七)

导入maven依赖

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

配置springboot的redis环境  application.yml 文件中

spring:
  redis:
    host: 127.0.0.1
    password: 
    port: 6379
    pool:
      max-idle: 100
      min-idle: 1
      max-active: 1000
      max-wait: -1

redis服务windows  下开机自启动

redis-server --service-install redis.windows.conf

手动启动redis

redis-server --service-start

猜你喜欢

转载自www.cnblogs.com/wookong/p/9224475.html