-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/#128 change http library #133
Conversation
- ์ ๊ธฐ์ ์ธ Header ์์ฑ ๊ฐ๋ฅ - ๋จ, springframework.web.bind ํจํค์ง์ Mapping Annotation ์ฐ๊ธฐ ๋ถํธํจ - Method ์ธ์ ์๋ฌ ๋ฐ์ -> spring.cloud.openfeign ์ ์ฌ์ฉํ์ง ์์ ์ด์ - ์ด๋ ธํ ์ด์ ์ต์ํ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ข์ ๊ฒ ๊ฐ์ต๋๋ค! ๋ค๋ง ํ๋ ๊ณ ๋ฏผ์ด ์๊ธด ๊ฒ์ด "client๊ฐ ๊ณผ์ฐ application layer์ ์ ํฉํ๊ฐ?" ๊ฐ ์๋ค์. ์ ์ฌ MSA๋ฅผ ์ฌ์ฉ ์ค์ด๋ผ client์ ์ญํ ์ด ์ธ๋ถ ์๋ฒ์์ ์๋ต์ ๋ฐ์์ค๋ ๊ฑฐ๋ผ๋ฉด application๋ณด๋ค interface์ ๋ ์ ํฉํ๋ค๋ ์๊ฐ๋ ๋ค์ด์! ํ๋ฒ ๊ณ ๋ฏผํด๋ณด๋ฉด ์ข์ ๊ฑฐ ๊ฐ์์!
public OkHttpClient okHttpClient() { | ||
return new OkHttpClient(); | ||
} | ||
// @Bean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฃผ์ ์ง์ฐ๊ธฐ!
|
||
val entity = new HttpEntity(null, headers); | ||
|
||
Map<String, String> headers = Map.of( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ญ๊ฐ header ๋ง๋๋๊ฒ ๊ณตํต์ ์ธ๊ฒ ์์ ๊ฑฐ ๊ฐ์๋ฐ ๋ฐ๋ก ๋บ ๋ฐฉ๋ฒ์ด ์์ผ๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค๋ ์๊ฐ์ด ๋๋ค์!
๋ค๋ฅธ ์๋น์ค ํด๋์ค์์๋ content-type๊ณผ Authorization์ ๊ณตํต์ ์ผ๋ก ์ฌ์ฉํ๋ ์ ๋ค์ ๋ชจ๋ ํด๋น ์ฝ๋๊ฐ ๋ฐ๋ณต๋ ์ ์๊ฒ ๋ค๋ ์๊ฐ...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ํฉ!! ์๋ถ๋ถ util static ํจ์๋ ๋ด๋ถ private ํจ์๋ก ๋ถ๋ฆฌ ํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gunom ์๋ถ๋ถ ๋ ๊ณ ๋ฏผํด๋ดค๋๋ฐ
playground token refresh api๋ accessToken ์ด ์๊ณ
x-api-key
& x-request-from
์ด๋ผ๋ ํน์ ํค๋ ๊ฐ์ด ํ์๋ก ํ๋๋ผ๊ตฌ์!!
๊ทธ๋์ ํค๋๋ Service๋ง๋ค ํน์์ฑ์ด ์์ ๊ฒ ๊ฐ๊ธฐ๋ ํ๋
๋ฉ์๋๋ก ๋ถ๋ฆฌํ๋๊ฒ ๊ฐ๋
์ฑ ๊ฐ์ ์ ๋์์ด ๋ ๊ฒ ๊ฐ๋ค๋ ๋ถ๋ถ์ ์ ์ ์ผ๋ก ๋์ํ์ฌ
์ฐ์ ๊ฐ Service ํด๋์ค์์ ์ฌ์ฉํ๋ ๊ณตํต ํค๋ ๊ฐ์ ํฌํจํ๋ Header Map ๊ฐ์ฒด ์์ฑ ๋ฉ์๋๋ฅผ private์ผ๋ก ์ ์ธํ์ฌ ์ฌ์ฌ์ฉํ๋๋ก ํ์ต๋๋ค!!
์ดํ ์ปค๋ฐ ๋ด์ฃผ์๋ฉด ๋ ๊ฒ ๊ฐ์์น~~
์ค์ค,....app ์ผ๋ก ๊ธฐ์ค์ ์ก๊ณ ์๊ฐํ๋ค๋ณด๋ service ๋ด๋ถ์์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๋ ์ฉ๋๋ก client๊ฐ ์ฌ์ฉ๋๊ธฐ์ application layer์ ํฌํจ๊ธฐ์ผ ๋์๋๋ฐ |
- ์ธ๋ถ ์๋ฒ์์ ์๋ต์ ๋ฐ์์ค๋ ๊ฐ์ฒด๋ค๋ก์ application ๊ณ์ธต๋ณด๋ค๋ interface ๊ณ์ธต์ ์๋ ๊ฒ์ด ๋ฐ๋์งํ๋ค๊ณ ํ๋จ
๐ PR Summary
๊ธฐ์กด RestTemplate์ OpenFeign์ผ๋ก ๋ง์ด๊ทธ๋ ์ด์
๐ต Working Branch
fix/#128-change-http-library
๐ด Works
๐ฑ Related Issue
#128