[英]Map to Set Mapping Workaround in Dozer
I'm trying to convert a Map to a Set in Dozer and I want to avoid having to write a custom converter at all costs. 我正在尝试在推土机中将地图转换为Set,我想避免不得不不惜一切代价编写一个自定义转换器。 Is there anyway I can use the get-method attribute in the configuration file to get the collection of values from the set (Losing the key values isn't an issue) and have Dozer convert from that?
无论如何,我可以使用配置文件中的get-method属性从集合中获取值的集合(丢失键值不是问题),然后让Dozer从中转换吗?
Here's what I've got so far, that isn't working 这是我到目前为止所没有的
<field>
<a is-accessible="true" get-method="values">sourceMap</a>
<b>targetSet</b>
<a-hint>Destination</a-hint>
<b-hint>OtherDestination</b-hint>
</field>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.