成熟丰满熟妇高潮XXXXX,人妻无码AV中文系列久久兔费 ,国产精品一国产精品,国精品午夜福利视频不卡麻豆

您好,歡迎來(lái)到九壹網(wǎng)。
搜索
您的當(dāng)前位置:首頁(yè)springboot redis key亂碼

springboot redis key亂碼

來(lái)源:九壹網(wǎng)

原寫(xiě)法:

@Autowired
private RedisTemplate redisTemplate;

?

寫(xiě)入redis后,查看key值

127.0.0.1:6379> keys *
1) "\xac\xed\x00\x05t\x00#ContentPlatform2:ES:UpSertESContent"
2) "\xac\xed\x00\x05t\x00%ContentPlatform2:Lock_v16:CJH_ARTICLE"
3) "\xac\xed\x00\x05t\x00!ContentPlatform2:Lock_v16:V_VIDEO"
4) "\xac\xed\x00\x05t\x00\x1bContentPlatform2:ES:Content"
5) "\xac\xed\x00\x05t\x00#ContentPlatform2:Lock_v16:CJH_VIDEO"
6) "\xac\xed\x00\x05t\x00%ContentPlatform2:Lock_v16:CMS_ARTICLE"

?

解決方式:

private RedisTemplate redisTemplate;

@Autowired(required = false)
public void setRedisTemplate(RedisTemplate redisTemplate) {
     RedisSerializer stringSerializer = new StringRedisSerializer();
     redisTemplate.setKeySerializer(stringSerializer);
     redisTemplate.setValueSerializer(stringSerializer);
     redisTemplate.setHashKeySerializer(stringSerializer);
     redisTemplate.setHashValueSerializer(stringSerializer);
     this.redisTemplate = redisTemplate;
}

?

調(diào)整后查看redis key值:

127.0.0.1:6379> keys *
1) "ContentPlatform2:Lock_v17:V_VIDEO"
2) "ContentPlatform2:Lock_v17:CMS_ARTICLE"
3) "ContentPlatform2:ES:Content"
4) "ContentPlatform2:Lock_v17:CJH_ARTICLE”

?

因篇幅問(wèn)題不能全部顯示,請(qǐng)點(diǎn)此查看更多更全內(nèi)容

Copyright ? 2019- 91gzw.com 版權(quán)所有 湘ICP備2023023988號(hào)-2

違法及侵權(quán)請(qǐng)聯(lián)系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市萬(wàn)商天勤律師事務(wù)所王興未律師提供法律服務(wù)