We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
接口代码:
@Post("/addProject.do") ProjectRespVO addProject(@JSONBody ProjectAddReqVO projectAddReqVO);
ProjectAddReqVO
import cn.com.huaruan.hrcodeframe.allplatform.thirdapi.vo.user.UserVO; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import java.io.Serializable; import java.time.LocalDate; import java.util.List; @Data @Builder public class ProjectAddReqVO implements Serializable { // 项目名称 private String projectName; // 项目编号 private String projectCode; // 项目日期 格式:YYYY-MM-DD // @JsonProperty("pDate") private LocalDate pDate; // 建设单位 private String jsdw; // 分院ID 默认-1 private Integer branchDeptId; // 分院ID,默认-1 // 项目负责部门ID(可选) private String pmpDeptId; // 项目负责人 private List<UserVO> pmpUser; // 项目注册负责人 private List<UserVO> zcUser; }
结果
Headers: User-Agent: forest/1.5.36 Content-Type: application/json Body: {"PDate":"2024-11-20","branchDeptId":-1,"jsdw":"测试","pmpUser":[{"userId":"123","userName":"测试"}],"projectCode":"测试","projectName":"测试项目","zcUser":[{"userId":"123","userName":"测试"}]}
经过测试,只要是一个字母的驼峰转换,最后都会变成大写,例如 pHello -> PHello
pHello
PHello
@JsonProperty
The text was updated successfully, but these errors were encountered:
这个lombok的问题,具体查询lombok相关,lombok对于单个字母的getter和setter与jackson处理不一致
getter
setter
Sorry, something went wrong.
No branches or pull requests
接口代码:
ProjectAddReqVO
结果
经过测试,只要是一个字母的驼峰转换,最后都会变成大写,例如
pHello
->PHello
这是BUG吗?
@JsonProperty
注解The text was updated successfully, but these errors were encountered: