写在前面:
继续记录自己的SpringBoot学习之旅,这次是SpringBoot应用相关知识学习记录。若看不懂则建议先看前几篇博客,详细代码可在我的Gitee仓库SpringBoot克隆下载学习使用!
3.5.1.6 Memcached缓存技术使用
3.5.1.6.1 下载安装
- 点击下载后解压到本地
- 用管理员权限打开cmd,跳转到解压目录并执行命令
memcached.exe -d install,如图![![[Pasted image 20220904163623.png]]](https://img-blog.csdnimg.cn/a746da21287e4e2ab6a45f39d4cc09c1.png)
- 启动服务,可在任务管理器服务中找到memcached服务项,点击启动即可,如图
![![[Pasted image 20220904163847.png]]](https://img-blog.csdnimg.cn/babcdebb101940fcb5da729395a5166f.png)
3.5.1.6.2 代码操作
- 添加坐标,如图
![![[Pasted image 20220904164251.png]]](https://img-blog.csdnimg.cn/97fa14ed3ef84db79d4d0759a07c179e.png)
- yml配置,SpringBoot未进行整合memcache,这里是手动配置,如图
![![[Pasted image 20220904201838.png]]](https://img-blog.csdnimg.cn/4efd445711724dffb950034dcd632f82.png)
- 属性配置,如图
![![[Pasted image 20220904201934.png]]](https://img-blog.csdnimg.cn/bfd6eee31f0a44e0b821a4b28e616256.png)
- 客户端配置,如图
![![[Pasted image 20220904202007.png]]](https://img-blog.csdnimg.cn/9c26082822434f11b41e8d73508e7f26.png)
- 业务层修改,如图
![![[Pasted image 20220904202100.png]]](https://img-blog.csdnimg.cn/53722149bbc247178f3f06939f9ac305.png)
3.5.1.7 Jetcache缓存技术
3.5.1.7.1 简述
- jetcache对SpringCache进行了封装,在原有功能基础上实现了多级缓存、缓存统计、自动刷新、异步调用、数据报表等功能
- jetcache设定本地缓存和远程缓存方案:
- 本地缓存:LinkedHashMap、Caffeine
- 远程缓存:Redis、Tair
3.5.1.7.2 jetcache远程缓存方案
- 添加坐标,如图
![![[Pasted image 20220926124212.png]]](https://img-blog.csdnimg.cn/a15f2270dbc543b78f55dae3586d08c6.png)
,若坐标为2.7.0以上,建议查找GitHub - yml配置默认参数,如图
![![[Pasted image 20220926124255.png]]](https://img-blog.csdnimg.cn/06b5f7bd0f434c819157d06f8476de58.png)
- 业务层配置,如图

- 业务层修改,如图
![![[Pasted image 20220926124444.png]]](https://img-blog.csdnimg.cn/2ca9e1b284084a2a80e2fcf8daa586aa.png)
- 开启缓存,如图
![![[Pasted image 20220926155157.png]]](https://img-blog.csdnimg.cn/cd48bce0641b4aabb53393b131c43cfc.png)
**注: - 所用项目为 Memcached缓存技术所用项目
- 若出现循环依赖问题,yml配置加上
Spring: main: allow-circular-references: true
3.5.1.7.3 jetcache本地缓存方案
- 添加坐标,同上
- yml配置,如图
![![[Pasted image 20220926154606.png]]](https://img-blog.csdnimg.cn/7ce84c9ec1c24f9cb128d39b020c0fdb.png)
- 业务层配置,如图
![![[Pasted image 20220926154830.png]]](https://img-blog.csdnimg.cn/8d2cce51c64a41b1a623dbbfe34028e9.png)
- 其它同上
3.5.1.7.4 jetcache方法缓存方案
- 开启缓存,如图
![![[Pasted image 20220926170032.png]]](https://img-blog.csdnimg.cn/3549525c7924496793e1c413e8009a13.png)
- yml配置,如图
![![[Pasted image 20220926170228.png]]](https://img-blog.csdnimg.cn/488ab63a6ed04d7786a538e0178f9972.png)
- 业务层修改,如图
![![[Pasted image 20220926170404.png]]](https://img-blog.csdnimg.cn/07d3be9864b24976a3b42e6b4fee91a1.png)
- 实体层序列化,如图
![![[Pasted image 20220926170434.png]]](https://img-blog.csdnimg.cn/cf17949251d94097a903876ef6452200.png)
3.5.1.8 J2cache缓存框架
3.5.1.8.1 简述
- j2cache为缓存整合框架,可以提供缓存的整合方案,使各种缓存搭配使用,自身不提供缓存功能
- 基于ehcache和redis整合
3.5.1.8.2 基本操作
- 创建项目,同Jetcache项目
- 添加坐标,如图
![![[Pasted image 20220929195720.png]]](https://img-blog.csdnimg.cn/af566c0790c249869b28cb017e3195cf.png)
- 配置yml,如图
![![[Pasted image 20220929195751.png]]](https://img-blog.csdnimg.cn/ab48541ba38c47eba3864ca26b1cfbac.png)
- 配置配置文件,如图
![![[Pasted image 20220929195813.png]]](https://img-blog.csdnimg.cn/30371405049f4c06b4f4684f934f5307.png)
- ehcache配置,同Ehcache.xml文件
- 业务层配置,如图
![![[Pasted image 20220929210142.png]]](https://img-blog.csdnimg.cn/8448be04ec7440c7a8acae715e72d6dc.png)


![JS——【案例】图片轮播图(自动轮播/手动点击/悬停显示)[技术栈:html、css、JavaScript]](https://img-blog.csdnimg.cn/58927de9256443569580a4160cc59939.png)







![[内排序]八大经典排序合集](https://img-blog.csdnimg.cn/img_convert/c7e3b71d338f87cb6fbf4acb7d6544ee.jpeg)








