Posts
Q&A
API Gateway๋ฅผ ํตํด ๋ผ์ฐํ ์ user service๋ก ์ ๋ฌ๋๋ ์์ฒญ url์ ๋ํด ์ง๋ฌธ ๋๋ฆฝ๋๋ค..!
cloud: gateway: routes: - id: user-service uri: lb://USER-SERVICE predicates: - Path=/user-service/** filters: - RewritePath=/user-service/(?.*), /${segment}์๋ ๊ฒ ํ์๋ฉด ๋ฉ๋๋ค! (RewritePath ๋ฐฉ์)spring: application: name: api-gateway cloud: gateway: routes: - id: A uri: lb://USER-SERVICE predicates: - Path=/user-service/** filters: - StripPrefix=1ํน์ ์ด๋ ๊ฒ ํ์ ๋ ๋๋๋ฐ,์ฐจ์ด์ ์ ์๋์ ๊ฐ๋ค๊ณ ํฉ๋๋ค.StripPrefix=1: ๋จ์ํ ์ง์ ๋ ์๋งํผ ๊ฒฝ๋ก์ ํ๋ฆฌํฝ์ค๋ฅผ ์ ๊ฑฐํฉ๋๋ค.RewritePath: ๊ฒฝ๋ก๋ฅผ ์ ๊ท ํํ์์ผ๋ก ๋ง์ถฐ์ ๋ ๋ณต์กํ ์์ ์ด ๊ฐ๋ฅํ๋ฉฐ, ๊ฒฝ๋ก์ ํน์ ๋ถ๋ถ์ ๋์ฒดํ๋ ๋ฑ์ ์ธ๋ฐํ ์ ์ด๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
- Likes
- 0
- Comments
- 1
- Viewcount
- 935
Q&A
๊ธฐ๋ณธ ์ธ์ด๊ฐ ์์ด๋ก ์ถ๋ ฅ๋ฉ๋๋ค.
File ๋์ , Resource Bundle๋ก ์ถ๊ฐํ์๋ฉด ์ ๋์ค๊ฒ๋๋ค. (์ฌ์ง) (์ฌ์ง)
- Likes
- 1
- Comments
- 2
- Viewcount
- 334




