hyun-seok.com
postsaboutguestbookplayground
Trouble-Shooting
3 posts
All
Dev
Experience
Project
Trouble-Shooting
DTO 필드 변수의 prefix 이슈

백엔드에서 DTO 만들어서 프론트에서 api 연동시 Response 값이 다르게 와서 문제가 발생한 상황입니다 문제점 중복을 확인하는 검증에서 Dto 클래스 필드의 변수를 isDuplicate로 지정을 했었다. 그 후 프론트에서의 API 연동에서 isDuplicate가 아니라 duplicate로 표시가 되었다. 기대되는 값은 이지만 표시되는 값은 였다. 원인 분석 원인은 lombok의 getter와 json을 직렬화 & 역직렬화하는 jackson 라이브러리에 있었다. lombok 라이브러리의 공식 문서를 살펴보면, You can annotate any field with @Getter and/or @Setter, to let lombok generate the default getter/setter automatically. A default getter simply returns the field, and is named getFoo if the field is called f…

2025.06.09
Trouble-Shooting

© Powered by ssseok