From 5a47803611ca22aa9cf0afbd5205e4b01c6f32db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Fri, 14 Aug 2020 21:30:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(test):=20=E4=BF=AE=E6=94=B9=E5=86=85?= =?UTF-8?q?=E5=B5=8Credis=E7=9A=84=E5=90=AF=E5=8A=A8=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-test.properties | 4 ++-- src/test/java/cn/celess/blog/RedisServerMock.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index f9bddea..7f8f605 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -79,8 +79,8 @@ spring.mail.properties.mail.smtp.socketFactory.fallback=false spring.redis.database=1 # Redis服务器地址 spring.redis.host=127.0.0.1 -# Redis服务器连接端口 -spring.redis.port=6379 +# Redis服务器连接端口 解决端口冲突 防止使用本地的redis +spring.redis.port=6380 # Redis服务器连接密码(默认为空) spring.redis.password= # 连接池最大连接数(使用负值表示没有限制) diff --git a/src/test/java/cn/celess/blog/RedisServerMock.java b/src/test/java/cn/celess/blog/RedisServerMock.java index fd8c377..ec1df6f 100644 --- a/src/test/java/cn/celess/blog/RedisServerMock.java +++ b/src/test/java/cn/celess/blog/RedisServerMock.java @@ -23,7 +23,7 @@ public class RedisServerMock { */ @PostConstruct public void startRedis() throws IOException { - redisServer = new RedisServer(6379); + redisServer = new RedisServer(6380); redisServer.start(); }