- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Summary
Since upgrading to Spring Boot 3.4.1, we have observed unexpected behavior where HTTP headers with names matching @JsonProperty annotations on POJO fields are being automatically deserialized into those fields. This behavior was not present in earlier versions.
Observations
- 
Affected Behavior: - An HTTP request with a priorityheader results in deserialization into theTaskQueryFilterParameter.priorityInfield, which has the annotation@JsonProperty("priority").
- Similarly, a plannedheader is deserialized into theTaskQueryFilterParameter.plannedWithinfield, annotated with@JsonProperty("planned").
 
- An HTTP request with a 
- 
Reproducibility: - This behavior occurs whenever request headers match the names used in @JsonPropertyannotations on request object fields.
 
- This behavior occurs whenever request headers match the names used in 
- 
Impact: - This behavior can lead to unintended data mapping, affecting applications that rely on these headers for different purposes.
 
- 
Analysis Results: - After reviewing the dependencies and updates introduced with Spring Boot 3.4.1, we were unable to identify the specific cause (e.g., a library or code change).
- It is unclear whether this is an intentional feature or a regression.
 
Expected Behavior
It is unclear whether HTTP headers with names matching @JsonProperty annotations should be automatically deserialized into POJO fields. If this is the intended behavior, guidance on how to configure or disable it would be helpful.
Actual Behavior
HTTP headers with names matching @JsonProperty annotations are deserialized into the respective POJO fields, even without explicit configuration.
Questions
- Is this behavior an intentional change in Spring Boot 3.4.1?
- If so, what is its purpose, and how can it be disabled if undesired?
- If this is a bug, is there a planned fix or workaround?
Thank you for your time and assistance! π
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug