Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

Spring AbstractMessageConverter ISSUE #4529

Open

Description

@Reagan1947

1. Spring AbstarctMessageConvert ISSUE

1.1 Summary

1.1.1 Issue Summary

When I try to use fast-json with spring cloud stream framework, it not working correctly. More details: in fast-json a message convert was supplied (See also: org.springframework.messaging.converter.AbstractMessageConverter). It not convert my message correctly. I got the error stack:

nested exception is com.alibaba.fastjson.JSONException: TODO

I noticed that in src/main/java/com/alibaba/fastjson/support/spring/messaging/MappingFastJsonMessageConverter.java the supports method return true directly.

The support Type (byte[] or String) should be determinate. Not Just return the true result

1.2 Code Changing

1.2.1 MappingFastJsonMessageConverter

    @Override
    protected boolean supports(Class<?> clazz) {
        // To determining the supporting type
    }

1.2.2 Root Cause

Without support type determinate. ANY TYPE object will be convert by this convertor.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions