写在前面:
继续记录自己的SpringBoot学习之旅,这次是SpringBoot应用相关知识学习记录。若看不懂则建议先看前几篇博客,详细代码可在我的Gitee仓库SpringBoot克隆下载学习使用!
![![[Pasted image 20220903171625.png]]](https://img.pic99.top/cnyincai/202402/d457e55987cca.png)
![![[Pasted image 20220903171639.png]]](https://img.pic99.top/cnyincai/202402/db40e5e157038cf.png)
![![[Pasted image 20220903171716.png]]](https://img.pic99.top/cnyincai/202402/5c043b4d34dcd.png)
![![[Pasted image 20220904141629.png]]](https://img.pic99.top/cnyincai/202402/11994672c5426c6.png)
![![[Pasted image 20220904141751.png]]](https://img.pic99.top/cnyincai/202402/3345c82846a8e9b.png)
![![[Pasted image 20220904141819.png]]](https://img.pic99.top/cnyincai/202402/a5a85ccc5248cb0.png)
![![[Pasted image 20220904141901.png]]](https://img.pic99.top/cnyincai/202402/422c357a9b5f544.png)
![![[Pasted image 20220904141947.png]]](https://img.pic99.top/cnyincai/202402/bb8172a277e9.png)
![![[Pasted image 20220904142038.png]]](https://img.pic99.top/cnyincai/202402/02ea946ee810c.png)
注:在上文项目里更改
net.sf.ehcache ehcache
# 配置cache使用技术
spring:cache: type: ehcacheehcache:config:ehcache.xml
ehcache.xml文件内容如下:
org.springframework.boot spring-boot-starter-data-redis
spring:# 使用redis缓存技术 cache: type: redis redis: use-key-prefix: true key-prefix: cache_ time-to-live: 5s redis: host: localhost port: 6379
注:其它类似上文