Skip to content

Restore Jackson XML participation in WebFlux codecs#36828

Open
Noah3521 wants to merge 1 commit into
spring-projects:mainfrom
Noah3521:gh-36776-jackson-xml-codecs
Open

Restore Jackson XML participation in WebFlux codecs#36828
Noah3521 wants to merge 1 commit into
spring-projects:mainfrom
Noah3521:gh-36776-jackson-xml-codecs

Conversation

@Noah3521
Copy link
Copy Markdown

Summary

This PR updates WebFlux default XML codec registration so Jackson XML codecs are available when present even if JAXB is also on the classpath.

The ordering intentionally keeps JAXB XML codecs before Jackson XML codecs to preserve existing WebFlux behavior for JAXB-eligible types while restoring Jackson XML availability for supported cases that JAXB does not cover.

It also applies XML-level Jackson String checks for both encoder and decoder, matching the JSON codec-level checks moved in gh-35872, so raw String values remain on String codec paths.

Closes gh-36776
Closes gh-36775

Verification

  • git diff --check
  • ./gradlew :spring-web:test --tests 'org.springframework.http.codec.support.CodecConfigurerTests' --tests 'org.springframework.http.codec.support.ClientCodecConfigurerTests' --tests 'org.springframework.http.codec.support.ServerCodecConfigurerTests' --tests 'org.springframework.http.codec.xml.JacksonXmlEncoderTests' --tests 'org.springframework.http.codec.xml.JacksonXmlDecoderTests' --configuration-cache
  • ./gradlew :spring-web:check --no-configuration-cache

Register Jackson XML after JAXB so WebFlux keeps JAXB-first
behavior while allowing Jackson XML when JAXB is also present.
Keep raw String values on the String codec path by applying
XML-level Jackson String guards.

Closes spring-projectsgh-36776
Closes spring-projectsgh-36775

Constraint: Avoid MVC parity claims; keep WebFlux JAXB first.
Rejected: Jackson-first XML registration | changes JAXB behavior.
Confidence: high
Scope-risk: moderate
Directive: Keep XML codec ordering tests explicit.
Tested: Targeted spring-web codec/configurer test suite.
Tested: ./gradlew :spring-web:check --no-configuration-cache
Not-tested: Full repository check.
Signed-off-by: noah3521 <noah3521@icloud.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

2 participants