SpringBoot 整合redis
来源:互联网 发布:知乎 瞎扯 编辑:程序博客网 时间:2024/05/18 00:58
SpringBoot整合redis
引入依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId></dependency>
SpringBoot的依赖管理引入和redis相关的依赖,然后添加xml配置
<bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig"> <property name="maxIdle" value="${redis.maxIdle}" /> <property name="maxWaitMillis" value="${redis.maxWait}" /> <property name="testOnBorrow" value="${redis.testOnBorrow}" /></bean><bean id="connectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" > <property name="poolConfig" ref="poolConfig" /> <property name="port" value="${redis.port}" /> <property name="hostName" value="${redis.host}" /> <property name="password" value="${redis.password}" /> <property name="timeout" value="${redis.timeout}"/></bean><bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate" > <property name="connectionFactory" ref="connectionFactory" /></bean >
阅读全文
0 0
- SpringBoot学习:整合Redis
- Springboot整合Redis
- springboot整合redis缓存
- springboot整合redis
- Springboot+redis 整合
- SpringBoot整合Redis
- Springboot整合Redis
- springBoot整合redis
- Springboot整合Redis缓存
- springboot整合redis集群
- springboot整合redis
- springBoot整合redis报错报错
- SpringBoot 整合redis
- 7.springboot整合redis
- springboot整合redis
- springboot整合redis
- Redis---------springboot整合Redis实例
- SpringBoot(三)整合Redis
- 免安装版MySQL的配置
- 密码学概览
- Mysql事务
- 网狐 数据库存储过程解密
- IT的道德与伦理
- SpringBoot 整合redis
- Week04_day01 Map
- java设计模式基础知识
- 共享锁和排他锁
- Python爬虫实例(1)-爬取一张猫的照片
- 02JS语法基础_正式学习前需要知道的知识
- NC6集团协同计划与制造解决方案整体业务流程
- 表格打印不自动分页原因
- kettle6.0 hadoop hbase交互记录