首页 > 编程知识 正文

redis配置文件,springboot核心配置文件

时间:2023-05-04 09:22:49 阅读:158957 作者:1597

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

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。