DozerMapper:对象转换器使用教程-创新互联
                                            dozer GitHub地址:https://github.com/DozerMapper/dozer

官方wiki:Introduction · GitBook
第一步:导包com.github.dozermapper dozer-core 6.5.2 package com.ymf.invoice.config;
import com.github.dozermapper.core.DozerBeanMapperBuilder;
import com.github.dozermapper.core.Mapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
import java.util.List;
@Configuration
public class DozerConfig {@Bean
    public Mapper dozerBeanMapper() {ListmappingFiles = Arrays.asList(
                "dozer-configration-mapping.xml"
        );
        return DozerBeanMapperBuilder.create()
                .withMappingFiles(mappingFiles)
                .build();
    }
}
 import com.github.dozermapper.core.Mapper;
@Autowired
private Mapper mapper;
InvoiceTaskDto invoiceTaskDto = mapper.map(invoiceTask, InvoiceTaskDto.class);你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧
本文标题:DozerMapper:对象转换器使用教程-创新互联
本文路径:http://www.scyingshan.cn/article/shgec.html

 建站
建站
 咨询
咨询 售后
售后
 建站咨询
建站咨询 
 