Jelajahi Sumber

增加redis配置文件

shuzheng 9 tahun lalu
induk
melakukan
1dd1ea34ac

+ 22 - 0
zheng-upms/zheng-upms-dao/src/main/resources/applicationContext-redis.xml

@@ -0,0 +1,22 @@
+<?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"
+       xsi:schemaLocation="
+           http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <!-- 引入jdbc配置文件 -->
+    <context:property-placeholder location="classpath:redis.properties"/>
+
+    <!-- Jedis ConnectionFactory -->
+    <bean
+        id="jedisConnectionFactory"
+        class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
+        p:host-name="${ip}"
+        p:port="${port}" />
+
+</beans>