外化java包装器

时间:2016-11-09 09:44:23

标签: java spring rest spring-boot wrapper

我开发了一个应用程序spring-boot。为了发出REST请求,我创建了许多像这个片段的映射器

....
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IssueFieldsWrapper {

    @JsonProperty("description")
    private String description;

    @JsonProperty("customfield_10406")
    private String mobileNumber;

....
}

问题是生产环境没有相同的JsonProperties(customfield_10406)。例如,Prod中的mobileNumber具有属性" customfield_10500"我应该像那样宣布

@JsonProperty("customfield_10500")
private String mobileNumber;

你有什么建议吗?

祝你好运

0 个答案:

没有答案