日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

Hutool cn.hutool.core.bean.BeanException: Set value of [xxx] error問題解決

作者:旭東怪 更新時間: 2022-02-26 編程語言

問題描述:

cn.hutool.core.bean.BeanException: Set value of [lastLoginTime] error!

問題分析:

1、在使用BeanUtil.copyProperties()方法時,lastLoginTime的類型不一致,導致報錯。

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserVO{
    private String username;
    private LocalDate lastLoginTime;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserDto {

    private String username;
    private LocalDateTime lastLoginTime;
}

解決辦法:使lastLoginTime的類型一致即可

原文鏈接:https://blog.csdn.net/qq_38974638/article/details/123048244

欄目分類
最近更新