Open
Conversation
khyu2
reviewed
Oct 29, 2024
Comment on lines
+8
to
+22
| public interface EventResponseInterface { | ||
|
|
||
| Long getId(); | ||
| String getTitle(); | ||
| String getDetail(); | ||
|
|
||
| Category getCategory(); | ||
|
|
||
| @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd hh:mm:ss", timezone = "Asia/Seoul") | ||
| LocalDateTime getStartDate(); | ||
|
|
||
| @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd hh:mm:ss", timezone = "Asia/Seoul") | ||
| LocalDateTime getEndDate(); | ||
|
|
||
| Long getMaxParticipant(); |
Contributor
There was a problem hiding this comment.
Response는 단순 dto 용도로만 사용되는 걸로 아는데 요러면 이점이 뭔가여 형님
Contributor
Author
There was a problem hiding this comment.
일단 nativequery 를 DTO 맵핑 시켜주기 위해서 interface로 생성했고
프론트엔드에서 가공없이 보여줄수있게끔 jsonformat 설정해서 값을 반환하게끔 하였숨
이점은...
nativequery 에서 바로 DTO 맵핑가능해서 편하다 ( 일반 querydsl 이나 jpa 처럼 바로 맵핑해서 보내면 됨 )
이게 궁금한게 아닝가..?
Contributor
Author
There was a problem hiding this comment.
방법은 직접 map을 생성해서 맵핑해줄수도 있고.. 뭐 그렇다고는 하던데
중요한것은 nativeQuery<<<<<<<<<<<Querydsl 이라는 것인데
관련사항은 검색해보면 나올고야
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.