gengar0917 / gengar0917/spring-firstweek
과제하며 고민한 사항들
- Dominant language
- No language data
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
[고민 사항]
1. Entity가 아닌 Dto를 반환하는 것
- Entity와 Dto의 차이점을 몰라서 따로 공부하여 학습하였다.
- 기술 매니저님의 도움을 받아 Dto와 Entity가 어떻게 쓰이는지 알게 되었다.
2. @RequesBody String 타입 받기 에러
- @RequestBody를 String 타입으로 하나만 받을 시 Json 형태로 받아지는 문제가 발생하였다.
- 이 문제 상황으로 인해 password를 @RequestBody로 받아 옳은 비밀번호인지를 확인하는 연산이 불가하게 되었다.
- String 타입이 아닌 Map 타입으로 @RequestBody를 받아 해결하였다.
- https://kes0917.tistory.com/48
3. 에러 메세지 출력
- 에러 메세지를 return 하려 해도 return 값 타입이 정해져 있으면 에러 메세지 return이 불가능하였다.
- 에러 메세지를 return 해 주는 클래스를 새로 만들고 각 service 메서드에 맞게 에러 메세지를 return하는 메서드를 새로 만들어서 추가하여 해결하였다.
4. RESTful api 에 대해
- Restful api에 대해 공부하였으나 어떻게 작성해야 Restful api인지 감이 잘 오지 않는다.
[코드 리뷰 받고 싶은 부분]
1. 에러 메세지 출력
- 에러 메세지를 return 하려 해도 return 값 타입이 정해져 있으면 에러 메세지 return이 불가함
- 에러 메세지를 return 해 주는 클래스를 새로 만들고 에러 메세지를 return하는 메서드를 새로 만들어서 추가함
=> 에러 메세지를 반환할 때 이런 방식을 사용하는 게 효율적인 방식이 맞는지가 궁금하고, 다른 방법이 있다면 어떤 방법이 있는지가 궁금함
2. RESTful api 에 대해
- Restful api에 대해 공부하였으나 어떻게 작성해야 Restful api인지 감이 잘 안 옴
=> 현재 작성된 코드가 RESTful하게 작성 되었는지가 궁금함
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the controller request handling and service methods referenced in the issue, along with the current error-response class. Then compare the existing endpoints with RESTful API guidance and document the recommended response and endpoint conventions. Done means the open questions have concrete, project-specific answers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend, backend-api-design
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100