diff --git a/cms/src/main/resources/application.properties b/cms/src/main/resources/application.properties
index ee14fbb6..51dac7c3 100644
--- a/cms/src/main/resources/application.properties
+++ b/cms/src/main/resources/application.properties
@@ -21,9 +21,9 @@ yo.fs.datasource.username=freeswitch
yo.fs.datasource.password=RR!h5IpirsnJ
# Redis
-yo.redis.host=172.16.92.232
-yo.redis.port=6379
-yo.redis.password=123456
+spring.redis.host=172.16.92.232
+spring.redis.port=6379
+spring.redis.password=123456
# CAS
tigon.shiro.cas.server.addr=https://cas.wacai.com
diff --git a/fsagent/src/main/resources/application.properties b/fsagent/src/main/resources/application.properties
index 28c0eb07..ffcc14d3 100644
--- a/fsagent/src/main/resources/application.properties
+++ b/fsagent/src/main/resources/application.properties
@@ -19,9 +19,9 @@ yo.fs.datasource.username=freeswitch
yo.fs.datasource.password=RR!h5IpirsnJ
# Redis
-yo.redis.host=172.16.92.232
-yo.redis.port=6379
-yo.redis.password=123456
+spring.redis.host=172.16.92.232
+spring.redis.port=6379
+spring.redis.password=123456
# Dubbo
diff --git a/lib/mapper/src/test/resources/application.properties b/lib/mapper/src/test/resources/application.properties
index d2985950..275a1367 100644
--- a/lib/mapper/src/test/resources/application.properties
+++ b/lib/mapper/src/test/resources/application.properties
@@ -6,6 +6,6 @@ yo.datasource.username=yoqw
yo.datasource.password=yoqw_query!
# Redis
-yo.redis.host=172.16.92.232
-yo.redis.port=6379
-yo.redis.password=123456
+spring.redis.host=172.16.92.232
+spring.redis.port=6379
+spring.redis.password=123456
diff --git a/lib/mybatis-cache/src/test/resources/application.properties b/lib/mybatis-cache/src/test/resources/application.properties
index f58bbfba..2a1ee2e3 100644
--- a/lib/mybatis-cache/src/test/resources/application.properties
+++ b/lib/mybatis-cache/src/test/resources/application.properties
@@ -1,7 +1,7 @@
spring.application.name=yo-mybatis-cache
# Redis
-yo.redis.host=172.16.92.232
-yo.redis.port=6379
-yo.redis.password=123456
+spring.redis.host=172.16.92.232
+spring.redis.port=6379
+spring.redis.password=123456
diff --git a/lib/redis/api/src/test/resources/application.properties b/lib/redis/api/src/test/resources/application.properties
index e69caf13..ad6c4020 100644
--- a/lib/redis/api/src/test/resources/application.properties
+++ b/lib/redis/api/src/test/resources/application.properties
@@ -1,5 +1,2 @@
-spring.application.name=YO_REDIS
+spring.application.name=yo-redis
-# Redis Cluster
-yo.redis-cluster.app-id=10003
-yo.redis-cluster.app-key=d7317ef13ea37c03f87fcd214755b341
diff --git a/lib/redis/raw/pom.xml b/lib/redis/raw/pom.xml
index 86cb7b1f..7c8d81eb 100644
--- a/lib/redis/raw/pom.xml
+++ b/lib/redis/raw/pom.xml
@@ -33,6 +33,11 @@
org.springframework.data
spring-data-redis
+
+ org.redisson
+ redisson-spring-boot-starter
+ 3.13.1
+
org.projectlombok
lombok
@@ -45,18 +50,19 @@
test
- org.springframework
- spring-test
+ org.springframework.boot
+ spring-boot-starter-test
test
+
+
+ spring-boot-starter-logging
+ org.springframework.boot
+
+
- org.apache.logging.log4j
- log4j-slf4j-impl
- test
-
-
- org.apache.logging.log4j
- log4j-core
+ org.springframework.boot
+ spring-boot-starter-log4j2
test
diff --git a/lib/redis/raw/src/main/resources/spring/spring-yo-redis-raw.xml b/lib/redis/raw/src/main/resources/spring/spring-yo-redis-raw.xml
index 22f73af2..79ca26ed 100644
--- a/lib/redis/raw/src/main/resources/spring/spring-yo-redis-raw.xml
+++ b/lib/redis/raw/src/main/resources/spring/spring-yo-redis-raw.xml
@@ -9,31 +9,31 @@
+ p:host-name="${spring.redis.host:localhost}"
+ p:port="${spring.redis.port:6379}"
+ p:password="${spring.redis.password:#{null}}"
+ p:database="${spring.redis.database:0}">
diff --git a/lib/redis/raw/src/test/java/com/pudonghot/yo/redis/raw/RawRedisClientTest.java b/lib/redis/raw/src/test/java/com/pudonghot/yo/redis/raw/RawRedisClientTest.java
index 2b89247f..b9268684 100644
--- a/lib/redis/raw/src/test/java/com/pudonghot/yo/redis/raw/RawRedisClientTest.java
+++ b/lib/redis/raw/src/test/java/com/pudonghot/yo/redis/raw/RawRedisClientTest.java
@@ -1,11 +1,14 @@
package com.pudonghot.yo.redis.raw;
import org.junit.Test;
+import lombok.SneakyThrows;
import org.junit.runner.RunWith;
import lombok.extern.slf4j.Slf4j;
+import org.redisson.api.RBlockingQueue;
+import org.redisson.api.RedissonClient;
import com.pudonghot.yo.redis.RedisClientApi;
+import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
@@ -13,11 +16,13 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* Jun 19, 2017 16:53
*/
@Slf4j
+@SpringBootTest(classes = TestDriver.class)
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration("classpath*:spring/spring-*.xml")
public class RawRedisClientTest {
@Autowired
private RedisClientApi redisClient;
+ @Autowired
+ private RedissonClient redisson;
@Test
public void testRun() {
@@ -26,4 +31,17 @@ public class RawRedisClientTest {
log.info("Get [{}] from redis result [{}].", key, redisClient.get(key));
log.info("Delete [{}] from redis result [{}].", key, redisClient.del(key));
}
+
+ @Test
+ @SneakyThrows
+ public void testQueue() {
+ final RBlockingQueue