Search before asking
- [x] I searched in the issues and found nothing similar.
Describe the bug
After upgrading to Spring Boot 4.0.0, we noticed this warning:
o.s.aop.framework.CglibAopProxy : Public final method [public final java.lang.Object tools.jackson.databind.ObjectMapper.readValue(tools.jackson.core.JsonParser,tools.jackson.core.type.ResolvedType) throws tools.jackson.core.JacksonException] cannot get proxied via CGLIB, consider removing the final marker or using interface-based JDK proxies.
It is a new change since Spring Framework 7 that prints warning when trying to proxy a class with public final methods.
I see only one method in JsonMapper/ObjectMapper that is public final:
https://github.com/FasterXML/jackson-databind/blob/1d6e5d539367f2a7515b3e0fff45a5e15d7f3f4d/src/main/java/tools/jackson/databind/ObjectMapper.java#L1024-L1029
So, this is an enhancement request to remove final from that public method.
Version Information
3.0.2
Reproduction
No response
Expected behavior
No response
Additional context
https://github.com/spring-projects/spring-boot/issues/48214
Comment From: pjfanning
It's a warning. Not like it stops you using the code. Marking methods as final is useful for performance and other reasons.
Comment From: cowtowncoder
If that is the only one (or one of small number), I am not against removing it. I don't think there is strong need or benefits in this particular case.
Comment From: cowtowncoder
Merged PR #5443, will be part of 3.1.0.