Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Spring AbstractMessageConverter ISSUE #4529

Open
Reagan1947 opened this issue Sep 6, 2024 · 0 comments
Open

Spring AbstractMessageConverter ISSUE #4529

Reagan1947 opened this issue Sep 6, 2024 · 0 comments

Comments

@Reagan1947
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant