Annotation Interface Dto


@Target(FIELD) @Retention(CLASS) public @interface Dto
Annotation to mark a field for inclusion in Data Transfer Objects (DTOs). This annotation can be used to specify whether the field should be included in a reference DTO.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    When set to true, the field will be included in a reference DTO.
    Names of additional response DTO variants this field should appear on.
  • Element Details

    • ref

      boolean ref
      When set to true, the field will be included in a reference DTO.
      Default:
      false
    • value

      String[] value
      Names of additional response DTO variants this field should appear on. For each name provided, CrudCraft will generate an EntityNameResponseDto containing all fields that specify the same name. Example: @Dto(value = {"List"}) on fields of User will produce a UserListResponseDto.
      Default:
      {}