简体   繁体   English

推土机布尔映射Eclipse错误

[英]Dozer Boolean mapping Eclipse error

I am using Dozer to map objects. 我正在使用推土机来映射对象。 But I am getting an wired error message 但是我收到一条有线错误消息

Property active for class com.edfx.adb.persist.entity.Customer cannot be read from. 无法读取com.edfx.adb.persist.entity.Customer类的活动属性。

in the Dozer Mapping Editor of Eclipse, I have Dozer plugin installed in Eclipse. 在Eclipse的Dozer映射编辑器中,我在Eclipse中安装了Dozer插件。 This is the mapping I have: 这是我的映射:

<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>

Here active is the field with type boolean in Customer and CustomerDTO class. CustomerCustomerDTO类中的boolean类型的字段active

I am unable to remove or hide the error message. 我无法删除或隐藏错误消息。 Also don't know why it is showing. 也不知道为什么显示。 And for this error Eclipse showing error in whole project which is undesirable. 对于此错误,Eclipse在整个项目中显示了错误,这是不希望的。

Any information would be very helpful to me. 任何信息对我都会非常有帮助。

I would try deleting hints. 我会尝试删除提示。 In this scenario I think you don´t need them. 在这种情况下,我认为您不需要它们。 But for best solution can you post your code for the entity and the DTO. 但是为了获得最佳解决方案,您可以为实体和DTO发布代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM