1234567891011121314151617181920212223242526272829303132333435 |
- <?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:aop="http://www.springframework.org/schema/aop"
- xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
- ">
-
- <!--Jedis连接池的相关配置-->
- <bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
- <!--新版是maxTotal,旧版是maxActive-->
- <property name="maxTotal">
- <value>${redis.pool.maxTotal}</value>
- </property>
- <property name="maxIdle">
- <value>${redis.pool.maxIdle}</value>
- </property>
- <property name="testOnBorrow" value="true"/>
- <property name="testOnReturn" value="true"/>
- </bean>
- <bean id="jedisPool" class="redis.clients.jedis.JedisPool">
- <constructor-arg name="poolConfig" ref="jedisPoolConfig" />
- <constructor-arg name="host" value="${redis.host}" />
- <constructor-arg name="port" value="${redis.port}" type="int" />
- <constructor-arg name="timeout" value="${redis.timeout}" type="int" />
- </bean>
-
- </beans>
|