인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

좋은 백조's profile image
좋은 백조

asked

Spring Security

4) Authentication handlers - AjaxAuthenticationSuccessHandler, AjaxAuthenticationFailureHandler

질문

Written on

·

236

0

선생님 response 로 json 을 던져줄 때 엔티티를 던져도되는건가요? dto 로 따로 변환후에 보내야하는 것 아닌가요 ? mapper 로 바꿔도,,
spring-bootjavaSpring Security

Answer 1

0

leaven님의 프로필 이미지
leaven
Instructor

dto 변환해서 보내는 것이 좋습니다.

dto 가 데이터 전송 객체이기 때문에 의미론적으로도 맞습니다.

entity 는 orm 객체이기 때문에 응답 시 기능상 오류가 없다고 하더라도 전송객체의 역할은 아니라고 생각되네요

좋은 백조's profile image
좋은 백조

asked

Ask a question