Giter Site home page Giter Site logo

redisutil's Introduction

RedisTemplate

自定义的 RedisTemplate 配置类相对于 Spring 提供的默认配置有以下几个优点:

  1. 自定义序列化方式:默认的 RedisTemplate 使用的是 JdkSerializationRedisSerializer,这种序列化方式生成的结果不易阅读,且占用空间大。在这个自定义配置中,使用了 Jackson2JsonRedisSerializerStringRedisSerializer,这样存储在 Redis 中的数据更易于阅读和理解。

  2. 更好的集成:自定义的 RedisTemplate 可以更好地集成到项目中,比如在这个配置中,使用了 ObjectMapper 来配置 Jackson2JsonRedisSerializer,这样可以更好地控制 JSON 的序列化和反序列化。

RedisUtil

详细用法参考自:https://github.com/iyayu/RedisUtil

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.