alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.98k stars 8.34k forks source link

【spring-cloud-starter-stream-rocketmq】fastjson leads to CamelCase1x. #3832

Closed guoshiqiufeng closed 1 month ago

guoshiqiufeng commented 2 months ago

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。另外请按照如下要求提交相关信息节省社区维护同学的理解成本,否则该讨论极有可能直接被忽视或关闭。 We recommend using English. If you are non-native English speaker, you can use the translation software. We recommend using English. If you are non-native English speaker, you can use the translation software. In addition, please submit relevant information according to the following requirements to save the understanding cost of community maintenances, otherwise the discussion is very likely to be ignored or closed directly.

Which Component eg. spring-cloud-starter-stream-rocketmq

Describe the bug Project dependencies:

Create a simple springboot project, pom.xml add the following dependencies

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

Starting a springboot project reports an error: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendController': Unsatisfied dependency expressed through field 'streamBridge': Error creating bean with name 'streamBridgeUtils' defined in class path resource [org/springframework/cloud/stream/function/FunctionConfiguration.class]: Unsatisfied dependency expressed through method 'streamBridgeUtils' parameter 0: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0: Error creating bean with name 'com.alibaba.cloud.stream.binder.rocketmq.convert.RocketMQMessageConverter' defined in class path resource [com/alibaba/cloud/stream/binder/rocketmq/autoconfigurate/ExtendedBindingHandlerMappingsProviderConfiguration.class]: Failed to instantiate [org.springframework.messaging.converter.CompositeMessageConverter]: Factory method 'rocketMQMessageConverter' threw exception with message: CamelCase1x

Additional context Exclude the fastjson dependency and introduce the fastjson dependency separately.

<dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>fastjson</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.83</version>
        </dependency>
github-actions[bot] commented 1 month ago

This issue has been open 30 days with no activity. This will be closed in 7 days.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it hasn't had any recent activity.If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Sping Cloud Alibaba Community.