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

[FEAT] naver maps api #10

Merged
merged 3 commits into from
Aug 31, 2023
Merged

[FEAT] naver maps api #10

merged 3 commits into from
Aug 31, 2023

Conversation

jinjoo-lab
Copy link
Collaborator

@jinjoo-lab jinjoo-lab commented Aug 23, 2023

추가/수정한 기능 설명

kakao 경로 API 문제점 : 경로에 대한 정보를 json으로 제공하지 않음 -> url 호출로 카카오 맵을 통해 확인 가능(별도로 카카오맵을 열어야 함)
naver maps api의 문제점 : 좌표에 대한 정보 제공이 부족 but 경로 제공 api가 json으로 제공

결론
기본적인 좌표에 대한 정보 제공 (목적지 , 주변 정보) - kakao api
경로 - naver api

추가
경로 제공을 naver maps api 사용
https://api.ncloud-docs.com/docs/ai-naver-mapsdirections-driving#RequestPositionFormat

webClient의 분리

  1. @qualifier 어노테이션 사용하여 KakaoWebClient 와 NaverWebClient 분리

특이사항

테스트까지는 진행하지 않음 (기본적인 연동에 집중한 첫 번째 커밋)

check list

  • issue number를 브랜치 앞에 추가 했나요?
  • [X ] 모든 단위 테스트를 돌려보고 기존에 작동하던 테스트에 영향이 없는 것을 확인했나요?
  • [O] 추가/수정사항을 설명했나요?

@ohksj77 ohksj77 changed the title Feat/naver maps api [FEAT] naver maps api Aug 29, 2023
@ohksj77 ohksj77 added the feat 기능 추가 label Aug 29, 2023
Copy link
Member

@ohksj77 ohksj77 left a comment

Choose a reason for hiding this comment

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

수고했어 많이 했네!
세세한거 조금만 수정해주면 될듯!

package com.twtw.backend.global.client;

public interface PathClient<T, R> {
public String request(T request);
Copy link
Member

Choose a reason for hiding this comment

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

나는 R을 return 값으로 쓰려고 넣었던 거고 여기서는 R이 안쓰이는 것 같아..!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

저게 일단 String으로 반환하는건데 나중에는 R로 바꿔야 해서
임시로 해놓은거야 저게 경로 반환값 정리를 아직 안해서 이제 R로 바꿔야함

public class SearchPathResponse {
int code;
String message;
String currentDateTime;
Copy link
Member

Choose a reason for hiding this comment

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

private 붙여줘!


String carType;

@Enumerated(value = EnumType.STRING)
Copy link
Member

Choose a reason for hiding this comment

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

이 어노테이션은 필요 없을 것 같구 private 붙여줘!

}

/*response 변경*/
@PostMapping("/search/path")
Copy link
Member

Choose a reason for hiding this comment

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

이거 약간 단어가 중복되는 느낌이 들어!
/paths/search/path 가 되니까..!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그럼 그냥 search까지만 할게 중복이 되긴하니까

@@ -15,7 +15,7 @@
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

@Configuration
@EnableWebSecurity
@EnableWebSecurity(debug = true)
Copy link
Member

Choose a reason for hiding this comment

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

요론거는 굳이 master에 반영 안해도 될듯?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ook

@jinjoo-lab jinjoo-lab merged commit ad5dd17 into master Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants