alibaba / alibaba/fastjson2

[QUESTION] 自定义的ObjectWriter如何使用配置信息里的值

Open
#1,095 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

### 请描述您的问题
我这里有一个url字段,然后我希望可以从配置文件读到url的域名,然后组装起来
我在构造函数上添加url,然后在Configuration中使用bean初始这个ObjectWriter的继承类

但是调用的时候提示java.lang.NoSuchMethodException: xxxxxxx.serializer.json.TenantCloudSerializer.()

请问如何可以解决这个问题?

Contributor guide

Open the contributing guide

Research direction

Review how Configuration instantiates the custom ObjectWriter subclass TenantCloudSerializer, focusing on the reported java.lang.NoSuchMethodException for its constructor. Reproduce the issue and identify the expected construction and configuration path; the issue is done when a concrete resolution is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.