【发布时间】:2020-11-21 16:02:11
【问题描述】:
我正在尝试使用 lombok @Data 调用 Class getMethod() 方法来调用模型的 getter,但我得到了 NoSuchMethod 异常。以下是我的课程:
模型类:
@Data
public class Claim {
private String customerName;
}
用法:
Claim.class.get("getCustomerName", String.class)
例外:
Method threw 'java.lang.NoSuchMethodException' exception.
【问题讨论】:
标签: java spring spring-boot lombok