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(); }