Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

경북대 BE_김영인 5주차 과제(3단계) #390

Open
wants to merge 32 commits into
base: youngini
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
58379a7
initial commit
Youngini Jul 24, 2024
6338ea5
Resolve merge conflicts
Youngini Jul 24, 2024
69a0c05
docs(README.md) : step1 구현할 기능 목록 작성
Youngini Jul 24, 2024
1591d81
docs(README.md) : 카카오 디벨로퍼에서 앱등록
Youngini Jul 24, 2024
010ac77
build(application.properties) : 카카오 로그인 api 사용을 위한 Rest api키를 시크릿 키로 설정
Youngini Jul 24, 2024
ea53aee
build(Application) : Application 실행 시, application-secret.properties 추가
Youngini Jul 24, 2024
c8b7e56
feat(KakaoAuthController) : 카카오 로그인을 통한 토큰을 받기 위한 Service 코드 작성
Youngini Jul 25, 2024
3cfd329
feat(KakaoAuthController) : 카카오 로그인을 통한 토큰을 받기 위한 Controller 코드 작성
Youngini Jul 25, 2024
48c941a
refactor(KakaoAuthService) : 카카오 로그인을 통해 토큰을 받아오면서 조금 더 직관적으로 이해할 수 있…
Youngini Jul 25, 2024
33c8d0b
feat(RestTemplateResponseErrorHandler) : RestTemplate 사용 시, 오류 처리
Youngini Jul 25, 2024
cdf85f0
feat(ForbiddenException) : 카카오 메시지 전송을 거부할 때 오류 처리
Youngini Jul 25, 2024
0286391
dosc(README.md) : 2단계 구현할 기능 목록 정리
Youngini Jul 26, 2024
d3af142
dosc(README.md) : 2단계 구현할 기능 목록 추가
Youngini Jul 26, 2024
be4b171
feat(Order) : order Entity 생성
Youngini Jul 26, 2024
6476e84
feat(OrderRepository) : order Repository 생성
Youngini Jul 26, 2024
0d716a9
feat(CreateOrderDto) : order 을 받기 위한 DTO
Youngini Jul 26, 2024
27a5e12
feat(OrderController) : 주문하기 Controller
Youngini Jul 26, 2024
78b6fd3
docs(README) : 구현한 기능 정리
Youngini Jul 26, 2024
21d0ff6
feat(OrderRequest) : 요구대로 OrderRequset 수정
Youngini Jul 26, 2024
9b11070
feat(OrderResponse) : 응답으로 받을 내용 정리
Youngini Jul 26, 2024
e1a221a
refactor(OrderController) : Response와 Request에 맞게 수정
Youngini Jul 26, 2024
63f8cac
refactor(OrderResponse) : 잘못된 데이터 타입 수정
Youngini Jul 26, 2024
ee5c4ea
feat(KakaoTokenService) : 카카오 메시지 보내기
Youngini Jul 26, 2024
3f558e6
dosc(README.md) : 1단계 + 2단계 반영 받기
Youngini Jul 28, 2024
e2f7253
refactor(KakaoAuthController) : API path 지정
Youngini Jul 28, 2024
c29db4d
refactor(KakaoTokenService) : 템플릿을 만들기 위해서 Json 객체 만들기
Youngini Jul 28, 2024
4a839b6
refactor(KakaoTokenService) : sendKakaoMessage는 전달 역할만 하도록 process Or…
Youngini Jul 28, 2024
0468cf9
refactor(OrderController) : sendKakaoMessage는 전달 역할만 하도록 process Orde…
Youngini Jul 28, 2024
09efb58
refactor(kakaoTokenService) : 토큰을 현재 세션 객체에서 뽑을 수 있도록 수정해보기
Youngini Jul 28, 2024
5f8f73e
dosc(README.md) : API 명세 링크
Youngini Jul 28, 2024
a928fc3
refactor (WishController) : pageable 수정
Youngini Jul 28, 2024
602deaf
Merge branch 'youngini' into step3
Youngini Jul 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@
- [x] 문자열을 만들어 주기 보다는, sendKakaoMessage는 전달 역할만 하고 문자열은 파라미터로 받아서 전달하기
- [x] 현재 세션 객체에서 토큰을 뽑아보기

## API 문서
notion : https://impossible-repair-22e.notion.site/57ec013f9424421eb2317b11a2b9a29c?v=f3fe7340ebae425bbfa70db78123a663

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ dependencies {
// 보안 관련 의존성
//implementation 'org.springframework.boot:spring-boot-starter-security'
//implementation 'org.springframework.security:spring-security-test'

//implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swagger는 시도해보신걸까요?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 시도했는데 Order에서 HttpSession에 문제가 발생했다고 오류가 떠서 어떻게 해야하나 고민중이었습니다!


// Json
implementation group: 'org.json', name: 'json', version: '20090211'

Expand Down
9 changes: 2 additions & 7 deletions src/main/java/gift/controller/WishController.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ public WishController(WishService wishService) {
}

@GetMapping
public ResponseEntity<Page<Wish>> getWishList(
@LoginMember Member member,
@RequestParam(defaultValue = "0") int page,
@RequestParam(defaultValue = "10") int size,
@RequestParam(defaultValue = "id") String sort,
@RequestParam(defaultValue = "asc") String direction) {
Pageable pageable = PageRequest.of(page, size, Sort.by(Sort.Direction.fromString(direction), sort));
public ResponseEntity<Page<Wish>> getWishList(@LoginMember Member member, Pageable pageable) {

Page<Wish> wishPage = wishService.getWishPage(member, pageable);
return ResponseEntity.ok(wishPage);
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/gift/service/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ public Member getMember(String token) {
public Member getMemberById(Long memberId) {
return memberRepository.findById(memberId).orElseThrow();
}

}
1 change: 0 additions & 1 deletion src/main/java/gift/service/OptionService.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ public void decreaseQuantity(Long option_id, Integer amount) {
public Option getOption(Long optionId) {
return optionRepository.findById(optionId).orElseThrow();
}

}
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ spring.mandatory-file-encoding=UTF-8
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.show-sql=true


spring.config.additional-location=classpath:application-secret.properties