Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否支持类似Dozer的map-id的功能 #3

Open
Howard-guo opened this issue Jun 6, 2016 · 1 comment
Open

是否支持类似Dozer的map-id的功能 #3

Howard-guo opened this issue Jun 6, 2016 · 1 comment

Comments

@Howard-guo
Copy link

dozer有一个特性,可以根据不同的场景选择不同的映射方式,方法是map的时候提供map-id。
tamper是否支持这个特性,或者有什么变通的办法呢?

另外,文档对配置文件放在哪里,mapper的实例如何获得等等都没有写,对我这种小白实在是有点困惑

@agapple
Copy link
Member

agapple commented Jun 7, 2016

  1. 配置文档例子:https://github.com/alibaba/tamper/blob/master/src/test/java/com/alibaba/tamper/ConfigTest.java
  2. map-id目前不支持, 目前支持BeanMappingBuilder机制,可以按需传入new BeanMapping(builder)来支持不同业务场景的转换. 例子:https://github.com/alibaba/tamper/blob/master/src/test/java/com/alibaba/tamper/BeanMappingDymaicTest.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants