convert to spring boot
This commit is contained in:
@@ -78,10 +78,15 @@ jdbc:
|
|||||||
|
|
||||||
# Redis 配置
|
# Redis 配置
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
|
# 是否启用 Redis
|
||||||
|
enable: false
|
||||||
|
|
||||||
# Redis 连接参数
|
# Redis 连接参数
|
||||||
host: 127.0.0.1
|
host: 192.168.11.12
|
||||||
port: 6379
|
port: 6379
|
||||||
|
isSSL: false
|
||||||
|
timeout: 2000
|
||||||
password: 1234
|
password: 1234
|
||||||
database: 0
|
database: 0
|
||||||
|
|
||||||
@@ -93,6 +98,9 @@ redis:
|
|||||||
maxIdle: 3
|
maxIdle: 3
|
||||||
maxTotal: 20
|
maxTotal: 20
|
||||||
|
|
||||||
|
# 是否启用Redis系统缓存及会话
|
||||||
|
cacheAndSession: false
|
||||||
|
|
||||||
# Mapper文件刷新线程
|
# Mapper文件刷新线程
|
||||||
mapperRefresh:
|
mapperRefresh:
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,34 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="
|
xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"
|
||||||
default-lazy-init="true">
|
default-lazy-init="true">
|
||||||
|
|
||||||
<description>Jedis Configuration</description>
|
<description>Jedis Configuration</description>
|
||||||
|
|
||||||
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
|
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
|
||||||
<!-- 池中最大空闲链接数 -->
|
<!-- 池中最大空闲链接数 -->
|
||||||
<property name="maxIdle" value="${redis.pool.maxIdle}" />
|
<property name="maxIdle" value="${redis.pool.maxIdle}" />
|
||||||
<!-- 池中最大链接数 -->
|
<!-- 池中最大链接数 -->
|
||||||
<property name="maxTotal" value="${redis.pool.maxTotal}" />
|
<property name="maxTotal" value="${redis.pool.maxTotal}" />
|
||||||
<!-- 当池中链接耗尽,调用者最大阻塞时间,超出此时间将跑出异常。(单位:毫秒;默认为-1,表示永不超时) -->
|
<!-- 当池中链接耗尽,调用者最大阻塞时间,超出此时间将跑出异常。(单位:毫秒;默认为-1,表示永不超时) -->
|
||||||
<property name="maxWaitMillis" value="10000" />
|
<property name="maxWaitMillis" value="10000" />
|
||||||
<!-- 是否检测空闲超时。如果超时,则会被移除 -->
|
<!-- 是否检测空闲超时。如果超时,则会被移除 -->
|
||||||
<property name="testWhileIdle" value="true" />
|
<property name="testWhileIdle" value="true" />
|
||||||
<property name="testOnBorrow" value="false" />
|
<property name="testOnBorrow" value="false" />
|
||||||
<property name="testOnReturn" value="false" />
|
<property name="testOnReturn" value="false" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="jedisPool" class="redis.clients.jedis.JedisPool">
|
<bean id="jedisPool" class="redis.clients.jedis.JedisPool">
|
||||||
<constructor-arg index="0" ref="jedisPoolConfig" />
|
<constructor-arg index="0" ref="jedisPoolConfig" />
|
||||||
<constructor-arg index="1" value="${redis.host}" />
|
<constructor-arg index="1" value="${redis.host}" />
|
||||||
<constructor-arg index="2" value="${redis.port}" type="int" />
|
<constructor-arg index="2" value="${redis.port}" type="int" />
|
||||||
<constructor-arg index="3" value="2000" type="int" />
|
<constructor-arg index="3" value="${redis.timeout}" type="int" />
|
||||||
<constructor-arg index="4" value="${redis.password}"/>
|
<constructor-arg index="4" value="${redis.password}"/>
|
||||||
<constructor-arg index="5" value="${redis.database}" type="int" />
|
<constructor-arg index="5" value="${redis.database}" type="int" />
|
||||||
<constructor-arg index="6" value="${redis.keyPrefix}"/>
|
<constructor-arg index="6" value="${redis.keyPrefix}"/>
|
||||||
</bean>
|
<constructor-arg index="7" value="${redis.isSSL}" type="boolean"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user