Spring boot 2.0 升级到 3.3.1 的相关问题 (五)

文章目录

Spring boot 2.0 升级到 3.3.1 的相关问题 (五)

druid 升级的问题

问题描述

1、配置无效的问题
druid-spring-boot-starter的自动配置不支持Spring boot 3.0版本的规则,自动配置无效。

2、druid 管理页面无法登录的问题

问题是因为druid的登录页面是用POST请求发送的Content-Type: application/x-www-form-urlencoded请求,而这个在Spring boot 2.4开始就不再默认支持处理,需要手动开启。

参考之前写的升级2.4.1版本的资料处理就可以了Spring boot 2.0.0 升级到 2.4.1 , POST 请求提交表单无法获取表单参数的问题

问题解决

替换druid-spring-boot-starter 为druid-spring-boot-3-starter 依赖。

截止到2024年7月24日,当前最新版本为1.2.23 ,引入这个版本就可以了。

spring-data-redis 的变动问题

问题描述

1、配置不生效的问题。

问题调研

在spring-boot-autoconfigure 3.3.1 版本修改了org.springframework.boot.autoconfigure.data.redis.RedisProperties,这个Properties的自动配置前缀为spring.data.redis ,原来为spring.redis

问题解决

Redis的配置的前缀更新为spring.data.redis

其他问题

引入spring.data.redis 后如果项目中有使用AOP 处理。比如AOP做的声明式事务、者启动了druid AOP 增强做的Service监控处理。就会出现大片的警告信息,类似于

复制代码
BeanPostProcessorChecker:Bean 'x' of type [y] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [projectingArgumentResolverBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.

虽然不影响实际的效果,并且问题点也很明确,但要解决起来还是比较麻烦,这个独立开一篇来处理。

相关推荐
江苏汉软5 小时前
制造企业为什么需要MES
java·数据库·制造·mes系统·mes软件
环境栈笔记5 小时前
浏览器多开同步怎么做?先分清设置、登录态和窗口操作
前端·人工智能·后端·自动化
deviant-ART5 小时前
java注解简写规则
java·后端
邪修king5 小时前
Re:Linux系统篇(三十八):进程间通信ChapterSystem V 信号量深度解析|同步互斥、内核源码、C 指针多态、实战代码
java·linux·c语言
文丑颜不良啊5 小时前
LeetCode1181~1200题目解析
java·leetcode
释厄6235 小时前
矢量词汇向下不向上公理即词汇归位定律——肤浅即表面
java·人工智能·算法·去中心化·1024程序员节
海绵宝宝转agent6 小时前
Leetcode100+面经
java·笔记·学习·算法·leetcode·深度优先
会编程的吕洞宾6 小时前
Spring Boot 镜像瘦身实战:从 450MB 瘦到 180MB
java·后端·spring
Shaoshing6 小时前
LeetCode100 283.移动零
java·数据结构·算法·leetcode