Skip to content

AbstractMessageConverter does not support wildcards in supported MIME types #36285

@cfranzen

Description

@cfranzen

There seems to be a bug in the most recent versions of JacksonJsonMessageConverter and MappingJackson2MessageConverter that has been introduced with this commit: b7cd049

The commit adds the additional default supported MIME type application/*+json to the converters that uses a wildcard to match against MIME types like application/vnd.springframework.type+json. However, the supportsMimeType() method of AbstractMessageConverter does not support such wildcards at all. The current situation in the code is a bit confusing and took us some time to figure out what is going on.

The current situation should be fixed (and I could contribute), I am just not sure what is the right solution here. We could either
a) remove the default supported MIME type with the wildcard or
b) add support for wildcards to AbstractMessageConverter

I am preferring option b) but that might have some performance impact. Would love to hear some more opinions on that.

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions