Java 从Hybris中的-items.xml生成最后一个类
java中的Final类意味着它不能被任何其他类扩展。在-Items.xml中定义数据模型时,如何在hybris中实现这一点?SAP hybris平台不支持生成开箱即用的最终数据模型类OOTB。您不能重写该机制,但可以修改位于src目录中的生成类。如果需要最终的数据模型类,例如Foo,可以手动添加此修改器Java 从Hybris中的-items.xml生成最后一个类,java,hybris,hybris-data-hub,Java,Hybris,Hybris Data Hub,java中的Final类意味着它不能被任何其他类扩展。在-Items.xml中定义数据模型时,如何在hybris中实现这一点?SAP hybris平台不支持生成开箱即用的最终数据模型类OOTB。您不能重写该机制,但可以修改位于src目录中的生成类。如果需要最终的数据模型类,例如Foo,可以手动添加此修改器 <itemtypes> <itemtype code="Foo" jaloclass="org.example.Foo"> <attrib
<itemtypes>
<itemtype code="Foo" jaloclass="org.example.Foo">
<attributes>
<!-- attributes -->
</attributes>
</itemtype>
</itemtypes>
为什么您特别想这样做?这些生成的文件放在src目录中,以允许开发人员添加其他行为。修改的好坏取决于更改的类型。我认为添加最终修改器不是一个好的改变,但这是可能的。
<itemtypes>
<itemtype code="Foo" abstract="true">
<attributes>
<!-- attributes -->
</attributes>
</itemtype>
</itemtypes>