SpringBoot学习笔记(8)-整合Redis

SpringBoot整合Redis 由于redis内部不提供Java对象的存储格式,因此当操作的数据以对象的形式存在时,会进行转码,转换成字符串格式后进行操作,为了方便开发者使用基于字符串为数据操作,spring boot整合redis时提供了专门的API接口StringRedisTemplate,你可以理解为这是RedisTemplate的一种指定数据泛型的操作API。以上使用的数据存储时一个键对应一个值,如果要维护的数据过多,可以使用别的数据存储结构,例如hash,它是一种一个键可以存储多个数据的存储模型。 阅读详情

由于版本原因,SpringBoot2.0整合Redis和低版本的SpringBoot不太一样,经测试,本文这套整合方案可以使用。

更多关于SpringBoot的总结请点击:SpringBoot使用总结


一、build.gradle

//redis clienet
	compile("redis.clients:jedis:2.9.0")
	//commons pool
	compile("org.apache.commons:commons-pool2:2.6.0")
	//redis starter
	compile("org.springframework.boot:spring-boot-starter-redis:2.0.4.RELEASE")
	//redis data
	compile("org.springframework.data:spring-data-redis:2.0.5.RELEASE")

二、application.properties

# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器地址
spring.redis.host=localhost
# Redis服务器连接端口
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
spring.redis.password=
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.jedis.pool.max-active=8
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.jedis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.jedis.pool.max-idle=8
# 连接池中的最小空闲连接
spring.redis.jedis.pool.min-idle=0
# 连接超时时间(毫秒)
spring.redis.timeout=1000

注意,如果使用的SpringBoot版本是1.5,那么spring.redis.jedis.pool.max-idl写成spring.redis.pool.max-idl


三、Controller

 @Autowired
    private StringRedisTemplate stringRedisTemplate;
    @RequestMapping(value="/redis")
    @ResponseBody
    public String redis(){
        System.out.println("hello");
        ValueOperations<String, String> ops = stringRedisTemplate.opsForValue();
        String hello = ops.get("hello");
        ops.set("redisTest","hello Redis",10000);
        return hello;
    }

经测试,以上配置全部可用

常用工具类


@Slf4j
@Component
public class RedisUtil {
   
   		 @Autowired
        private StringRedisTemplate redisTemplate;

        /**
         * 写入redis缓存(不设置expire存活时间)
         * @param key
         * @param value
         * @return
         */
        public boolean set(final String key, String value){
            boolean result = false;
            try {
                ValueOperations operations = redisTemplate.opsForValue();
                operations.set(key, value);
                result = true;
            } catch (Exception e) {
                log.error("写入redis缓存失败!错误信息为:" + e.getMessage());
            }
            return result;
        }

        /**
         * 写入redis缓存(设置expire存活时间)
         * @param key
         * @param value
         * @param expire 毫秒为单位
         * @return
         */
        public boolean set(final String key, String value, Long expire){
            boolean result = false;
            try {
                ValueOperations operations = redisTemplate.opsForValue();
                operations.set(key, value);
                redisTemplate.expire(key, expire, TimeUnit.MILLISECONDS);
                result = true;
            } catch (Exception e) {
                log.error("写入redis缓存(设置expire存活时间)失败!错误信息为:" + e.getMessage());
            }
            return result;
        }


        /**
         * 读取redis缓存
         * @param key
         * @return
         */
        public Object get(final String key){
            Object result = null;
            try {
                ValueOperations operations = redisTemplate.opsForValue();
                result = operations.get(key);
            } catch (Exception e) {
                log.error("读取redis缓存失败!错误信息为:" + e.getMessage());
            }
            return result;
        }

        /**
         * 判断redis缓存中是否有对应的key
         * @param key
         * @return
         */
        public boolean exists(final String key){
            boolean result = false;
            try {
                result = redisTemplate.hasKey(key);
            } catch (Exception e) {
                log.error("判断redis缓存中是否有对应的key失败!错误信息为:" + e.getMessage());
            }
            return result;
        }

        /**
         * redis根据key删除对应的value
         * @param key
         * @return
         */
        public boolean remove(final String key){
            boolean result = false;
            try {
                if(exists(key)){
                    redisTemplate.delete(key);
                }
                result = true;
            } catch (Exception e) {
                log.error("redis根据key删除对应的value失败!错误信息为:" + e.getMessage());
            }
            return result;
        }

        /**
         * redis根据keys批量删除对应的value
         * @param keys
         * @return
         */
        public void remove(final List<String> keys){
            for(String key : keys){
                remove(key);
            }
        }


    /**
     * hash类型写入redis缓存(针对需要持久保存的对象)
     * @param key
     * @param value
     * @return
     */
    public boolean hset(String hkey,String key, String value){
        boolean result = false;
        try {
            HashOperations<String, String, String> hashOperations = redisTemplate.opsForHash();
            hashOperations.put(hkey,key,value);
            result = true;
        } catch (Exception e) {
            log.error("写入redis缓存失败!错误信息为:" + e.getMessage());
        }
        return result;
    }

    /**
     * 获取hash数据
     * @param key
     * @param value
     * @return
     */
    public Object hget(String hkey,String key){
        Object result = null;
        try {
            HashOperations<String, String, String> hashOperations = redisTemplate.opsForHash();
            Boolean aBoolean = hashOperations.hasKey(hkey, key);
            if (!aBoolean) {
                return null;
            }
            Object response = hashOperations.get(hkey, key);
            result = response;
        } catch (Exception e) {
            log.error("写入redis缓存失败!错误信息为:" + e.getMessage());
        }
        return result;
    }

}
springboot2与redis整合 Redis,对于大家来说应该不陌生,是经常使用的开发技术之一。原始的RDBMS关系型数据库,能够存储海量的数据,但是在某些特殊的情况下,性能并不是特别的好,例如热点数据的读写,数据缓存等。Redis作为NoSQL中的一员,基于内存数据存储,支持多种数据结构,单线程处理,是一款高性能的可持久化key-value数据库。对于Redis就不做过多介绍了,相信大家或多或少都了解过,下面重点描述Spring... 阅读详情

相关推荐

基于SpringBoot 2.0.3.RELEASE+Mybatis+Redis的SSO单点登录系统

基于SpringBoot 2.0.3 RELEASE+Mybatis+Redis的SSO单点登录系统

SpringBoot2.0整合Redis

首先引入POM依赖 &lt;!--nosql数据库--&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-data-redis&lt;/artifactId&gt; &lt;/dependenc...

和我一起学习吧 4万+

springboot整合redis的完整例子

springboot整合redis的完整例子,里面封装了redis五种数据类型的工具类

springboot2.0 集成redis服务详解,以及 (Lettuce & Jedis)

在实际项目开发过程中,相信很多人都有用到过 redis 这个NoSQL,这篇文章就详细讲讲springboot如何整合 redis简单介绍下Redis:Redis是一个开源的使用 ANSI C语言编写,支持网络,可基于内存也可持久化的日志型,Key-Value数据库,并提供了多种语言的 API ,相比Memcached它支持存储的类型相对更多 (字符,哈希,集合,有序集合,列表等),同时Redis是线程安全的。

优秀技术文章收录 2656

springboot整合redis

SpringBoot整合Redis,包括整合单机版Redis、redis-cluster集群、redis哨兵模式

智能织梦:基于Rokid AR眼镜的家庭情感记忆增强系统设计与实践

本文介绍了基于Rokid AR眼镜的'智能织梦'系统,通过增强现实技术捕捉和重现家庭情感记忆。系统利用多模态传感器和轻量级情感识别模型,自动记录家庭互动中的情感峰值时刻,并生成沉浸式记忆片段。测试数据显示,该系统显著提升了家庭情感互动的频率和质量,特别适用于多代同堂家庭和记忆唤醒场景。

sre5engineer的博客 538

SpringBoot项目为MyBatis配置逆向代码生成插件

一篇简单的MyBatis逆向代码生成器的配置教程

Saltman_LY的博客 790

PyCharm启动报错急救指南:3步定位.vmoptions文件位置(Win/Mac路径详解)

本文针对PyCharm启动失败问题,提供了一份详细的急救指南。核心在于精准定位并修复关键的.vmoptions配置文件。文章通过三步法详解了在Windows和macOS系统上查找该文件的具体路径,并分析了因新旧版本冲突、破解补丁残留或参数设置错误导致启动失败的常见场景及解决办法,帮助开发者快速恢复IDE的正常工作。

weixin_28835789的博客 702

SpringBoot之整合Redis分析和实现-基于Spring Boot2.0.2版本

背景介绍 公司最近的新项目在进行技术框架升级,基于的Spring Boot的版本是2.0.2,整合Redis数据库。网上基于2.X版本的整个Redis少之又少,中间踩了不少坑,特此把整合过程记录,以供小伙伴们参考。 本文的基于在于会搭建Spring Boot项目的基础上进行的,入门是小白的话,请自行学习相关基础知识,网上或相关书籍很多。 由于我本人对Maven比较熟悉,所以是以Maven进行的...

瘦子没有夏天 6万+

matlab特征提取和分类_SAST Weekly|MATLAB机器学习初探——做个心音分类器

SAST weekly 是由电子工程系学生科协推出的科技系列推送,内容涵盖信息领域技术科普、研究前沿热点介绍、科技新闻跟进探索等多个方面,帮助同学们增长姿势,开拓眼界,每周更新,欢迎关注!欢迎愿意分享知识的同学投稿至 eesast@mail.tsinghua.edu.cn , 期待你的作品!本期的SAST weekly,想跟大家分享一下如何用MATLAB进行初步的机器学习,构建一个正常/...

weixin_36453829的博客 5582

零基础学写《扫雷》游戏(Qt扫雷源码)

扫雷游戏是在windows系统中自带的游戏,他的游戏玩法其实很简单,20世纪初期电脑上没有啥游戏可以玩,所以扫雷游戏也算是当时是最常火爆的一个电脑游戏。以下文章详细介绍扫雷游戏的实现。实现语言为C++。

啊渊的专栏 1万+

springboot2.0整合redis案例

首先创建一个springboot项目。添加pom配置: &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-data-redis&lt;/artifactId&gt; &lt;/dependency&gt;p...

qq_24076549的博客 2万+

高通IPA硬件加速介绍

‌ 高通IPA (Internet Protocol Accelerator)模块是一种硬件加速模块,由高通公司(Qualcomm)提供,主要用于优化移动设备上的网络数据传输,特别是通过 LTE 、 5G 等移动网络的数据传输‌‌。IPA模块通过硬件加速,显著提高了数据传输的速度和效率,同时降低了设备的功耗,并提供了更稳定的网络连接,减少了数据传输中的丢包和延迟‌。

四儿家的小祖宗的博客 1627

springBoot学习笔记(8)—— 整合redis缓存组件

更多文章 更多系列文章在个人网站 springBoot学习系列笔记文章 springBoot学习笔记(1)—— 搭建springBoot项目 文章目录更多文章springBoot学习系列笔记文章一、redis是什么?二、springBoot整合redis缓存的步骤1. 引入jar包2. 完整pom内容3. application配置内容4.redis序列化配置5. service服务6. 常用缓存注解说明7. 缓存截图总结 提示:以下是本篇文章正文内容,下面案例可供参考 一、redis是什么? Red

xiayz的博客 1244

Python 复现AlexNet框架代码

【代码】Python 复现AlexNet框架代码。

Quintin 2422

双端之Nginx+Php结合PostgreSQL搭建Wordpress

制作的 PG4WP 分支版本,它与所有版本的 WordPress 兼容,解决了原版的一些问题。参数,确保 PostgreSQL 正在监听默认端口(通常是 5432),或者你自定义的端口。:PG4WP 插件存在缺陷和不完整的功能,可能与最新版本的 WordPress 不兼容。的插件,它允许 WordPress 使用 PostgreSQL 数据库。,如果看到 Nginx 的默认欢迎页面,说明 Nginx 已正确安装。,如果看到 Nginx 的默认欢迎页面,说明 Nginx 已正确安装。

宇宙第一小趴菜的博客 1894

详解SpringBoot整合Redis

SpringBoot整合Redis 在SpringBoot中一般使用RedisTemplate提供的方法来操作Redis。那么使用SpringBoot整合Redis 需要那些步骤呢。 1.JedisPoolConfig(这个是配置连接池) 2.RedisConnectionFactory(这个是配置连接信息,这里的RedisConnectionFactory是一个接口, 我们需要使用它的实...

XiangYida 12万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Springboot整合Redis

首先我们要知道Redis是什么:Redis一个NoSQL数据库,常用作缓存使用( cache ),用户访问应用,如果找数据的话会先访问redis,如果redis中有数据的话就直接返回发给用户,如果redis中没有的话我们再去查数据库,找到了数据之后一方面存到redis中,另一方面再反馈给用户,目的是说如果用户下次再访问类似的数据的话,redis中就有了。Redis如何启动:双击;客户端双击exit就退出了。

桂林电子科技大学 -芳 5043

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

SpringBoot整合redis+mysql

SpringBoot+Redis+mysql

陆卿之的博客 4627

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

SpringBoot整合Redis[详细版]

SpringBoot整合Redis[详细版]Redis是现在最受欢迎的NoSQL数据库之一,Redis是一个使用ANSI C编写的开源。spring-boot-starter-data-redis在SpringBoot中集成了两个模版一个是RedisTemplate,另一个为 StringRedisTemplate而虽然StringRedisTempate帮助我们做了序列化,但是存储数据的时候只能存储Sting类型的数据,而RedisTemplate可以存储Object类型,所以我们一个使用RedisT

wang20000102的博客 8915

【SpringBoot】SpringBoot整合Redis

SpringBoot整合Redis 首先我是在Windows上开发的,因此需要在Windows安装Redis,安装的教程Windows下安装Redis服务,这个教程很容易懂,我按照教程一步一步安装下来,很久就可以运行Redis了。 这个教程在【JAVA】IDEA中SpringBoot整合M...

阳阳的博客 2511

【SpringBoot整合系列】SpringBoot整合Redis[附redis工具类源码]

SpringBoot整合redis

低调做人,低调编码,神码都是浮云 1705

Springboot2整合Redis

Springboot2整合RedisSpringboot2整合Redis新的改变01:导入依赖02:配置03:查看源码:RedisAutoConfiguration自动配置类04:直接使用05:修改默认的序列化方法06:测试使用后的END Springboot2整合Redis 新的改变 Spring Boot 1.0 默认使用的是 Jedis 客户端,2.0 替换成 Lettuce Lettuce...

冲动的仔bb博客 4895

【开发】SpringBoot 整合 Redis

Redis 在项目开发过程中,扮演着 “缓存”、“会话存储”、“消息队列”、“数据存储”等角色,可以提示系统的性能、可扩展性和稳定性,同时还可以实现各种复杂的功能需求。下面,我对 Spring Boot 整合 Redis 作了归纳总结,供大家参考,谢谢!qwq

借他一双眼,愿这盛世如先生所愿 1818
上一篇: SpringBoot学习笔记(7)-整合Mybatis
下一篇: SpringBoot学习笔记(9)-使用Junit单元测试
BoringRong
BoringRong 领域专家: 后端开发技术领域 领域专家: 后端开发技术领域
博客等级 码龄9年 2万+粉丝 386原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

BoringRong

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值