一、首先引入Redis依赖的jar包并添加配置
//添加Ridis库
compile('org.springframework.boot:spring-boot-starter-redis:1.3.8.RELEASE')
//添加第三方验证
compile('cn.apiclub.tool:simplecaptcha:1.2.2')
redis:
database: 4
host: 112.74.112.251
port: 6379
password:
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
二、创建Redis的工厂类
package com.nsu.Bean;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.