SpringBoot中使用Redis缓存 在pom.xml中添加redis和springboot整合的依赖 配置文件application.yml添加redis基本配置 启动类开启缓存注解 将需要缓存的对象序列化