mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
4c1b4f33a8
Prior to this commit, `HttpMessageConverters` would consider the JAXB message converters when building `HttpMessageConverters` instances. We noticed that, on the server side, the Jakarta JAXB dependency is very common on the classpath and often brought transitively. At runtime, this converter can use significant CPU resources when checking the `canRead`/`canWrite` methods. This can happen when content types aren't strictly called out on controller endpoints. This commit changes the auto-detection mechanism in `HttpMessageConverters` to not consider the JAXB message converter for server use cases. For client use cases, we keep considering this converter as the runtime cost there is lower. Closes gh-36302