报错信息
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of io.github.talelin.latticy.dto.user.AppLoginDTO (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of io.github.talelin.latticy.dto.user.AppLoginDTO (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
拉取的Lin CMS最新代码。 代码如下
@PostMapping("/qq/login") public String appLogin(@Validated @RequestBody QQLoginDTO loginDTO) { return "aaa"; }
` @Data @NoArgsConstructor public class QQLoginDTO {
} `
如果code参数没传,返回给前端没有任何提示信息
{ "code": 10030, "message": "", "request": "POST /user/qq/login" }
报错信息 org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of
io.github.talelin.latticy.dto.user.AppLoginDTO
(although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance ofio.github.talelin.latticy.dto.user.AppLoginDTO
(although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)好像是因为只有一个参数检验的时候不能正常序列化 有什么优雅的办法解决这个问题吗