学习笔录-SPRING BOOT

spring 整合 redis,以及spring的RedisTemplate如何使用

需要的jar包 spring-data-redis-1.6.2.RELEASE.jar jedis-2.7.2.jar(依赖commons-pool2-2.3.jar) commons-pool2-2.3.jarspring-redis.xml配置文件<beans xmlns="http://www.springframework.org/s

需要的jar包 
spring-data-redis-1.6.2.RELEASE.jar 
jedis-2.7.2.jar(依赖 commons-pool2-2.3.jar) 
commons-pool2-2.3.jar

spring-redis.xml 配置文件

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/mvc
      http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
        http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
        http://www.springframework.org/schema/util 
      http://www.springframework.org/schema/util/spring-util-3.0.xsd"><!--[redis-JedisPoolConfig配置](http://blog.csdn.net/liang_love_java/article/details/50510753)--><!--    jedis-2.7.2.jar 依赖jar包 commons-pool2-2.3.jar 
        jedis基于 commons-pool2-2.3.jar 自己实现了一个资源池。
        配置参数 详见 http://blog.csdn.net/liang_love_java/article/details/50510753
-->
    <bean id="jedisPoolConf

原创不易,完成人机校验,阅读全文

相关推荐