mybatis

Spring

[Mybatis] Mybatis에서 DTO로 분리하기

개요 현재 회사에서는 하나의 객체를 만들어 모든 레이어에서 사용하거나 Controller Layer에서 HashMap으로 받고 있습니다. 추가적으로 제약조건으로 Post Method만 허용합니다. 회원 (코멘트) API를 예로 들어 DTO로 분리해 보겠습니다. AS-IS 1. 회사에서 사용하는 VO (모든 레이어에서 사용) @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Builder @JsonNaming(UpperSnakeCaseStrategy.class) public class UserVO { private Long USER_ID; private String NAME; private String COMMENT; private String EMAIL;..

mers
'mybatis' 태그의 글 목록