redis配置,属性文件spring.redis.hostname :192.168.174.128
spring.redis.port: 6379
spring.redis.password : Xuan 123456
spring.redis.database: 2 #缺省使用db0
spring.redis.timeout: 0
spring.redis.pool.max-active :8
spring.redis.pool.max-wait :-1
spring.redis.pool.max-idle :8
spring.redis.pool.min-idle :
redis配置,yml文件spring:
redis:
# redis数据库索引(缺省值为0 )使用索引为3的数据库,以避免与其他数据库冲突
数据库: 3
# # redis服务器地址(默认为localhost ) ) ) ) ) ) ) ) ) ) ) ) ) redis服务器地址(默认为localhost ) ) )
主机:本地主机
# redis端口(默认为6379 ) )。
端口: 6379
# redis访问密码(默认为空) )。
密码:
# redis连接超时时间(以毫秒为单位) ) )。
timeout: 0
# redis连接池配置
pool:
#最大可用连接数(默认值为8,负数为无限) )。
最大活动: 8
#最大空闲连接数(默认值为8,负数为无限) )。
最大- idle : 8
#最小空闲连接数(默认为0,此值只对正数有效) )。
最小化: 0
#从连接池获取连接的最大等待时间。 (默认值为-1,单位为毫秒,负数为无限) )。
最大等待:-1
参考微博spring-boot融合redis mybatis