首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > DTO Builder是一个DTO填料java库

DTO Builder是一个DTO填料java库

  • 资源大小:9.99 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: java dto 一个

资 源 简 介

DtoBuilder is annotation based java library for filling DTO objects from e.g. domain model objects. Usage is quite simple just annotate your DTO java bean with DtoProperty or DtoClass annotations. The annotations are used to mark from which classes the DTO should be filled from e.g. @DtoProperty(sourceClass=Person.class)public String getName() { return name;} this means that the name property should be fetched from Person java bean. By default the builder uses the same property name for the source but it can also be defined like this @DtoProperty(sourceClass=Person.class, sourceProperty="bday")public Date getBirthday() { return birthday;} so here the value is fetched from a property named bday. If you have multiple properties and they all are named the same way in the source and in the dto you can also annotate the whole dto class @DtoClass(sourceClasses={Person.class})public class Per
VIP VIP
0.203551s