mapStruct使用(mapstruct使用教程)

//导入依赖项和lt;& lt; groupId&gt org.mapstruct< / groupId>& lt; artifactId&gt mapstruct< / artifactId>& lt; version&gt 1.2.0.Final< / version>& lt; / dependency>& lt; dependency>& lt; groupId&gt org.mapstruct< / groupId>& lt; artifactId&gt mapstruct-processor< / artifactId>& lt; version&gt 1.2.0.Final< / version>& lt; / dependency>//编写接口类@Mapper公共接口Publish2PublishVO {Publish2PublishVO INSTANCE = mapper . getmapper (Publish2PublishVO.class);centerproductdatpublishvo to centerproductdatpublishvo (centerproductdatpublishvo);} //调用使用centerproductdatappublishvo centerproductdatappublishvo = publish2publishvo . instance . tocenterproductdatappublishvo (centerproductdatpublishvo);
// import dependencies
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.2.0.Final</version>
</dependency>
//Write the interface class
@Mapper
public interface Publish2PublishVO {
Publish2PublishVO INSTANCE = Mappers.getMapper(Publish2PublishVO.class);
CenterProductDataPublishVO toCenterProductDataPublishVO(CenterProductDataPublish centerProductDataPublish);
}
// call to use
CenterProductDataPublishVO centerProductDataPublishVO = Publish2PublishVO.INSTANCE.toCenterProductDataPublishVO(centerProductDataPublish);
JAVA

使用nginx作为文件服务器来读取由tomcat创建的文件(mysql 如何跨服务器读取数据库)

2023-1-18 13:27:18

JAVA

安徽区块链联盟链体系发展|国内联盟链平台介绍(要推动以联盟链为重点发展区块链服务平台对不对)

2023-1-18 13:28:10

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索