报错信息:
2023-09-21T16:02:00.833+08:00 ERROR 23220 --- [nio-8080-exec-1] i.global.iot.common.utils.ConvertUtils : convert error
java.lang.InstantiationException: io.global.iot.common.modules.dto.ZyOrderDTO
at java.base/java.lang.Class.newInstance(Class.java:639)
at io.global.iot.common.utils.ConvertUtils.sourceToTarget(ConvertUtils.java:38)
at io.global.iot.common.service.impl.BaseServiceImpl.getPageData(BaseServiceImpl.java:92)
at io.global.iot.common.modules.service.impl.ZyOrderServiceImpl.page(ZyOrderServiceImpl.java:39)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
代码块:
去看了下对象用了@Builder注解,
加@NoArgsConstructor 和 @AllArgsConstructor两个注解即可解决。