-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importIssues migrated from JIRA with more than 10 votes at the time of importin: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issuetype: enhancementA general enhancementA general enhancement
Description
Keith Donald opened SPR-6731 and commented
Noticed when using @RequestBody
to bind an incoming JSON string to an Account JavaBean. I was expecting the binding process to respect format annotations such as @NumberFormat
and @DateTimeFormat
during string-to-propertyType conversion. However, this did not happen since it appears the MappingJacksonHttpMessageConverter is using the default Jackson ObjectMapper by default. For consistency, we should consider configuring Jackson to work with the ConversionService during its mapping process. This would allow format annotations like @NumberFormat
and @DateTimeFormat
to be respected.
Affects: 3.0 GA
Issue Links:
- Allow usage of ConversionService for Jackson HttpMessageConverter [SPR-7054] #11715 Allow usage of ConversionService for Jackson HttpMessageConverter ("is duplicated by")
- Support jackson mix-in classes in Jackson2ObjectMapperFactoryBean [SPR-12144] #16758 Support jackson mix-in classes in Jackson2ObjectMapperFactoryBean
- Add serializerByType() deserializerByType() and mixIn() to Jackson2ObjectMapperBuilder [SPR-12313] #16918 Add serializerByType() deserializerByType() and mixIn() to Jackson2ObjectMapperBuilder
- resolveRequestBody algorithm does not take into account ConversionService when determining if binding is possible [SPR-6729] #11395 resolveRequestBody algorithm does not take into account ConversionService when determining if binding is possible
13 votes, 20 watchers
Metadata
Metadata
Assignees
Labels
has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importIssues migrated from JIRA with more than 10 votes at the time of importin: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issuetype: enhancementA general enhancementA general enhancement