开发者

dozer custom convertors for primitive types

开发者 https://www.devze.com 2022-12-28 00:42 出处:网络
the below url has an example on dozer custom convertors.. Map collection size in Dozer but when i tried that example its giving the exception like this..

the below url has an example on dozer custom convertors..

Map collection size in Dozer

but when i tried that example its giving the exception like this..

Type: null Source parent class: dozerPackage.Source Source field name: images Source field type: class java.util.ArrayList Source field value: [www, eee] Dest parent class: dozerPackage.Destination Dest field name: numOfImages Dest field type: int

开发者_StackOverflow中文版

org.dozer.MappingException: Destination Type (int) is not accepted by this Custom Converter (dozerPackage.TestCustomFieldConverter)!

is there any way that i can return the primitive types from dozer custom convertors..


The short answer is no. This feature is not yet implemented. Please use old CustomConverter interface instead of DozerConverter to achieve the desired behavior.

Forum thread is here: https://sourceforge.net/projects/dozer/forums/forum/452531/topic/3698691

Feature Request for tracking is here: https://sourceforge.net/tracker/?func=detail&aid=2997109&group_id=133517&atid=727371

0

精彩评论

暂无评论...
验证码 换一张
取 消