spring boot下使用RedisTemplate操作redis存取对象
在spring boot环境下有个StringRedisTemplate对象,默认已经为我们配置好了,只需要自动注入过来就能用,但是使用它只能在Redis中存放字符串。具体操作如下:@RunWith(SpringRunner.class)@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)@...
原创
2018-08-25 14:47:58 ·
44978 阅读 ·
4 评论