去除key错误多带的冒号 : ,会导致redis工具显示的时候显示了不带冒号的key。同时无法删除和操作该key

This commit is contained in:
zhouxiunai
2018-12-20 15:41:37 +08:00
parent 2cf3a6ce23
commit 25e22a6e72
@@ -0,0 +1,23 @@
package com.gzzn.omms.msgexchangeapi.redis;
import java.util.Arrays;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class RedisServiceTest {
@Autowired
RedisService redisService;
@Test
public void removeFlightInfo()
{
redisService.del(Arrays.asList("FlightInfo:"));
}
}