Java data transfer object naming convention?

前端 未结 5 1388
不知归路
不知归路 2020-12-04 05:44

Given this scenario where you have \"transfer objects\" (POJO\'s with just getters/setters) which are passed by a client library to your API, what is the best way to name th

5条回答
  •  心在旅途
    2020-12-04 06:48

    I generally add 'DTO' to the end of the Class name as well as place all the DTO's in their own package. In your example I would call it com.x.core.dto.CarDTO.

提交回复
热议问题