Is it possible to configure Dozer such that by default fields are rather accessed directly that through setter-/getter method

孤街浪徒 提交于 2019-12-05 00:57:34

You can set it on a class level.

<mapping>
   <class-a is-accessible="true">MyClass</class-a>
   ...
</mapping>

From the Dozer XSD:

is-accessible Indicates whether Dozer bypasses getter/setter methods and accesses the field directly. This will typically be set to "false". The default value is "false". If set to "true", the getter/setter methods will NOT be invoked. You would want to set this to "true" if the field is lacking a getter or setter method.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!