Dozer XML将多类映射到单类映射问题

时间:2019-06-13 14:06:17

标签: java xml dozer

我正在使用推土机在xml中映射多个类,我真的很担心以下映射是否可行。

我尝试了以下操作,但是电话未显示在XML中:

enter code here
<https://jsfiddle.net/mauryarule1_gmailcom/hmnyj0zp/2/? 
utm_source=website&utm_medium=embed&utm_campaign=hmnyj0zp>?

我想做什么:

<mapping wildcard="false" map-null="false">
    <class-a>XXXX.XXXX.acord_pc_1_22.external.XXXX.NameInfoType</class-a>
    <class-b>XXXX.iaa7_1.XXXX.ccss.XXXX.Stuff</class-b>
    <field>
        <a>personName.GivenName.value</a>
        <b>quote.prospectName.firstName</b>
    </field>
    <field>
        <a>personName.Surname.value</a>
        <b>quote.prospectname.lastName</b>
    </field>
    <field custom-converter="XXXX.is.XXXX.converter.ListToListConverter" custom-converter-param="C40">
        <a>personName.OtherGivenName</a>
        <b>quote.prospectname.middleNames</b>
    </field>
</mapping>
<mapping wildcard="false" map-null="false">
    <class-a>XXXX.XXXX.acord_pc_1_22.external.XXXX.PhoneInfoType</class-a>
    <class-b>XXXX.iaa7_1.XXXX.ccss.XXXX.Stuff</class-b>
    <field>
        <a>phoneNumber.value</a>
        <b>quote.prospectName.phone</b>
    </field>
</mapping>

0 个答案:

没有答案