spring boot下使用RedisTemplate操做redis存取对象

在spring boot环境下有个StringRedisTemplate对象,默认已经为咱们配置好了,只须要自动注入过来就能用,可是使用它只能在Redis中存放字符串。具体操做以下:html @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
相关文章
相关标签/搜索