【发布时间】:2026-01-13 07:05:03
【问题描述】:
我正在使用Dozer 来映射对象。但我收到一条有线错误消息
com.edfx.adb.persist.entity.Customer 类的活动属性不能 从中读取。
在 Eclipse 的推土机映射编辑器中,我在 Eclipse 中安装了推土机插件。这是我的映射:
<mapping>
<class-a>com.edfx.adb.persist.entity.Customer</class-a>
<class-b>com.edfx.adb.web.dto.CustomerDTO</class-b>
<field>
<a get-method="isActive">active</a>
<b get-method="isActive">active</b>
<a-hint>java.lang.Boolean</a-hint>
<b-hint>java.lang.Boolean</b-hint>
</field>
</mapping>
这里的active 是Customer 和CustomerDTO 类中类型为boolean 的字段。
我无法删除或隐藏错误消息。也不知道为什么会显示。对于这个错误,Eclipse 会在整个项目中显示错误,这是不可取的。
任何信息都会对我很有帮助。
【问题讨论】:
标签: java eclipse eclipse-plugin mapping dozer