中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

最專業(yè)的外貿(mào)網(wǎng)站建設(shè)廣州關(guān)鍵詞seo

最專業(yè)的外貿(mào)網(wǎng)站建設(shè),廣州關(guān)鍵詞seo,廈門網(wǎng)站建設(shè)開發(fā)公司,wordpress $query前提紀(jì)要:因為業(yè)務(wù)變動,需要在原先只支持protobuf的前提序列化的前提下,新增正常的序列化讀取數(shù)據(jù)所以在原先的基礎(chǔ)上進行優(yōu)化。文章用于記憶。 話不多說直接上代碼 Configuration AutoConfigureAfter(RedisAutoConfiguration.class) Import…

前提紀(jì)要:因為業(yè)務(wù)變動,需要在原先只支持protobuf的前提序列化的前提下,新增正常的序列化讀取數(shù)據(jù)所以在原先的基礎(chǔ)上進行優(yōu)化。文章用于記憶。
話不多說直接上代碼

@Configuration
@AutoConfigureAfter(RedisAutoConfiguration.class)
@Import({RedisAutoConfiguration.class})
@Slf4j
public class ProtobufRedisTemplateConfig  {private final LettuceConnectionFactory lettuceConnectionFactory;public ProtobufRedisTemplateConfig (LettuceConnectionFactory lettuceConnectionFactory) {this.lettuceConnectionFactory = lettuceConnectionFactory;}@Beanpublic RedisTemplate<Object, Object> protobufRedisTemplate() {RedisTemplate<Object, Object> template = new RedisTemplate<>();template.setConnectionFactory(lettuceConnectionFactory);RedisSerializer<byte[]> byteRedisSerializer = new RedisSerializer<byte[]>() {@Overridepublic byte[] serialize(byte[] bytes) throws SerializationException {return new byte[0];}@Overridepublic byte[] deserialize(byte[] bytes) {return bytes;}};template.setKeySerializer(byteRedisSerializer);template.setValueSerializer(byteRedisSerializer);template.setHashKeySerializer(byteRedisSerializer);template.setHashValueSerializer(byteRedisSerializer);template.afterPropertiesSet();log.warn("the Lettuce-protobuf starting success, date is -->" + new Date());return template;}@Beanpublic RedisTemplate<String, Object> jsonRedisTemplate() {RedisTemplate redisTemplate = new RedisTemplate<>();redisTemplate.setConnectionFactory(lettuceConnectionFactory);// 使用Jackson2JsonRedisSerializer 替換默認(rèn)的JDKSerializationRedisSerializer 來序列化和反序列化redis 的value值Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);redisTemplate.setKeySerializer(new StringRedisSerializer());redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);redisTemplate.setHashKeySerializer(new StringRedisSerializer());// hash的value序列化方式采用jacksonredisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);redisTemplate.afterPropertiesSet();return redisTemplate;}
}

使用

    @Autowired@Qualifier("protobufRedisTemplate")private RedisTemplate<Object, Object> protobufRedisTemplate;@Autowired@Qualifier("jsonRedisTemplate")private RedisTemplate<String, Object> redisTemplate;
http://www.risenshineclean.com/news/48284.html

相關(guān)文章:

  • 一般app開發(fā)費用seo外包公司費用
  • betheme做網(wǎng)站怎么樣網(wǎng)店網(wǎng)絡(luò)營銷與推廣策劃書
  • 網(wǎng)站布局結(jié)構(gòu)如何引流客源最快的方法
  • 網(wǎng)站版面布局結(jié)構(gòu)武漢百度百科
  • 跳轉(zhuǎn)網(wǎng)站正在建設(shè)中seo網(wǎng)絡(luò)推廣經(jīng)理招聘
  • 自己做網(wǎng)站代理產(chǎn)品5188關(guān)鍵詞平臺
  • wordpress怎樣顯示子類目長春網(wǎng)站seo
  • 希爾頓酒店網(wǎng)站建設(shè)的優(yōu)點網(wǎng)站推廣軟件哪個最好
  • 網(wǎng)站的客服怎么做小程序開發(fā)收費價目表
  • 蘇州網(wǎng)站制作服務(wù)營銷的概念
  • 網(wǎng)站建設(shè)2019小說排行榜百度
  • h5手機網(wǎng)站開發(fā)demo品牌的宣傳及推廣
  • 建網(wǎng)站和做微信哪個好百度賬號注冊入口
  • 江蘇藝居建設(shè)有限公司網(wǎng)站整合營銷什么意思
  • python網(wǎng)站開發(fā) django桂平網(wǎng)絡(luò)推廣
  • 長春網(wǎng)站建設(shè)方案seo服務(wù)內(nèi)容
  • icp網(wǎng)站負(fù)責(zé)人關(guān)鍵詞看片
  • 花都網(wǎng)站建設(shè) 駿域網(wǎng)站最好的推廣平臺排名
  • 網(wǎng)站開發(fā)培訓(xùn)學(xué)費今日軍事新聞頭條打仗
  • 設(shè)計師服務(wù)平臺官網(wǎng)seo網(wǎng)絡(luò)營銷外包公司
  • 電子商務(wù)網(wǎng)站建設(shè)利益分析網(wǎng)絡(luò)推廣外包代理
  • 丹陽論壇學(xué)生班級優(yōu)化大師
  • 凡客網(wǎng)站的域名怎么做seo優(yōu)化代理
  • 網(wǎng)站服務(wù)搭建開魯網(wǎng)站seo
  • 濟南網(wǎng)站建設(shè)優(yōu)化精準(zhǔn)客源app
  • 站群管理軟件百度軟件中心官網(wǎng)
  • 中企動力做的網(wǎng)站被百度屏蔽seo第三方點擊軟件
  • 網(wǎng)站建設(shè)應(yīng)注重實用性湖北百度推廣電話
  • 男子做淫穢網(wǎng)站圖片seo優(yōu)化廠商
  • 網(wǎng)站建設(shè)管理報告免費制作網(wǎng)站