zoukankan      html  css  js  c++  java
  • applicationContext-redis.xml

     applicationContext-redis.xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
    http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    
    <context:property-placeholder location="classpath*:*.properties" />
    <!-- redis 相关配置 -->
    <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="JedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
    p:host-name="${redis.host}" p:port="${redis.port}" p:password="${redis.pass}" p:pool-config-ref="poolConfig"/>
    
    <bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
    <property name="connectionFactory" ref="JedisConnectionFactory" />
    </bean>
    </beans>
  • 相关阅读:
    MyGeneration的NHibernate代码生成模版
    ASP.NET页面控制回车触发按钮
    操作NHibernate进行多事务并发处理的一些小经验
    mysql之sql_mode =only_full_group_by 设置问题
    1、一维数组排序
    使用正则表达式构造定制的HTML5输入框
    JavaScript加密库CryptoJS的使用
    安全密码存储,该怎么做,不该怎么做?
    google 站内搜索
    导入导出xls数据
  • 原文地址:https://www.cnblogs.com/cjh-code/p/11900646.html
Copyright © 2011-2022 走看看