Spring Cloud\uc640 API Gateway\ub294 \ud604\ub300\uc801\uc778 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc744 \uad6c\uc131\ud558\uae30 \uc704\ud55c \ud544\uc218\uc801\uc778 \uc694\uc18c\uc774\ub2e4. \ud558\uc9c0\ub9cc, \uc774\ub4e4\uc758 \ubcf4\uc548 \uae30\ub2a5\uc740 \ubb34\uc2dc\ud560 \uc218 \uc5c6\ub294 \uc911\uc694\uc131\uc744 \uac00\uc9c4\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 Spring Cloud\uc640 API Gateway\uc5d0\uc11c\uc758 \uc778\uc99d \ubc0f \uad8c\ud55c \uad00\ub9ac \ubc29\ubc95, \uadf8\ub9ac\uace0 \ubcf4\uc548 \uae30\ub2a5\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\ub2e4.<\/p>\n
Spring Cloud\ub294 \ud074\ub77c\uc6b0\ub4dc \uae30\ubc18\uc758 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc744 \uad6c\uc131\ud558\uace0 \uad00\ub9ac\ud558\uae30 \uc704\ud55c \ub3c4\uad6c \ubaa8\uc74c\uc774\ub2e4. \uc774\ub294 \ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4 \uc544\ud0a4\ud14d\ucc98\ub97c \uad6c\uc131\ud558\ub294 \ub370 \ud544\uc218\uc801\uc778 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4. API Gateway\ub294 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc5d0\uc11c\uc758 \uc9c4\uc785\uc810 \uc5ed\ud560\uc744 \ud558\uba70, \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \ubc31\uc5d4\ub4dc \ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4 \uac04\uc758 \ud2b8\ub798\ud53d\uc744 \uad00\ub9ac\ud55c\ub2e4.<\/p>\n
Spring Cloud\uc640 API Gateway\uc5d0\uc11c\ub294 OAuth 2.0\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc778\uc99d \ubc0f \uad8c\ud55c \uad00\ub9ac\ub97c \uad6c\ud604\ud560 \uc218 \uc788\ub2e4. OAuth 2.0\uc740 \uc778\uc99d \uc11c\ubc84\uc640 \uc790\uc6d0 \uc11c\ubc84\ub97c \ubd84\ub9ac\ud558\uc5ec \ubcf4\uc548\uc131\uc744 \ub192\uc778\ub2e4. API Gateway\uc5d0\uc11c\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc758 \uc694\uccad\uc744 \ubc1b\uc544 \uc778\uc99d \uc11c\ubc84\ub85c \uc804\ub2ec\ud558\uace0, \uc778\uc99d \uc11c\ubc84\uc5d0\uc11c \ubc1c\uae09\ud55c \ud1a0\ud070\uc744 \uc774\uc6a9\ud558\uc5ec \uc790\uc6d0 \uc11c\ubc84\uc5d0 \uc694\uccad\uc744 \ubcf4\ub0b4 \uc778\uc99d\uc744 \uc644\ub8cc\ud55c\ub2e4. \uc774\ub97c \uc704\ud574 Spring Cloud\uc5d0\uc11c\ub294 Spring Security\uc640 Spring Cloud Security\ub97c \uc81c\uacf5\ud55c\ub2e4.<\/p>\n
@Bean\npublic SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {\n http.authorizeExchange()\n .pathMatchers(\"\/admin\/**\").hasAuthority(\"ROLE_ADMIN\")\n .pathMatchers(\"\/**\").hasAnyAuthority(\"ROLE_USER\", \"ROLE_ADMIN\")\n .anyExchange().permitAll()\n .and()\n .oauth2Login();\n return http.build();\n}<\/code><\/pre>\n\uc704 \ucf54\ub4dc\ub294 API Gateway\uc5d0\uc11c\uc758 \ubcf4\uc548 \uc124\uc815 \uc608\uc2dc\uc774\ub2e4. authorizeExchange()\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc694\uccad \uacbd\ub85c\uc5d0 \ub300\ud55c \uad8c\ud55c \uc124\uc815\uc744 \ud560 \uc218 \uc788\ub2e4.<\/p>\n
Spring Cloud\uc640 API Gateway\uc758 \ubcf4\uc548 \uae30\ub2a5 \uc124\uba85<\/h2>\n
Spring Cloud\uc5d0\uc11c\ub294 Netflix OSS\uc5d0\uc11c \uac1c\ubc1c\ud55c Zuul, Spring Cloud Gateway \ub4f1\uc758 API Gateway\ub97c \uc81c\uacf5\ud55c\ub2e4. \uc774\ub4e4\uc740 \ub2e4\uc591\ud55c \ubcf4\uc548 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4. \uc608\ub97c \ub4e4\uc5b4, Zuul\uc740 SSL\/TLS\ub97c \uc9c0\uc6d0\ud558\uba70, Spring Cloud Gateway\ub294 IP \uc81c\ud55c, Rate Limiting \ub4f1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4. \ub610\ud55c, Spring Cloud\uc5d0\uc11c\ub294 Spring Cloud Security\uc640 OAuth 2.0\uc744 \uc774\uc6a9\ud558\uc5ec \uc778\uc99d \ubc0f \uad8c\ud55c \uad00\ub9ac\ub97c \uad6c\ud604\ud560 \uc218 \uc788\ub2e4.<\/p>\n
Spring Cloud\uc640 API Gateway\ub294 \ud604\ub300\uc801\uc778 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc744 \uad6c\uc131\ud558\ub294 \ub370 \ud544\uc218\uc801\uc778 \uc694\uc18c\uc774\ub2e4. \ud558\uc9c0\ub9cc, \uc774\ub4e4\uc758 \ubcf4\uc548 \uae30\ub2a5\uc740 \ubb34\uc2dc\ud560 \uc218 \uc5c6\ub294 \uc911\uc694\uc131\uc744 \uac00\uc9c4\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 Spring Cloud\uc640 API Gateway\uc5d0\uc11c\uc758 \uc778\uc99d \ubc0f \uad8c\ud55c \uad00\ub9ac \ubc29\ubc95, \uadf8\ub9ac\uace0 \ubcf4\uc548 \uae30\ub2a5\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uc558\ub2e4. \uc774\ub97c \ud1b5\ud574 \ubcf4\ub2e4 \uc548\uc804\ud558\uace0 \uc2e0\ub8b0\uc131 \ub192\uc740 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc744 \uad6c\uc131\ud560 \uc218 \uc788\uc744 \uac83\uc774\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"
Spring Cloud\uc640 API Gateway\uc758 \uc778\uc99d \ubc0f \uad8c\ud55c \uad00\ub9ac<\/p>\n","protected":false},"author":1,"featured_media":12633,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1957],"tags":[2119,2082,2468,2156],"class_list":["post-23004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-api","tag-cloud","tag-gateway","tag-spring"],"acf":[],"_links":{"self":[{"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/posts\/23004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/comments?post=23004"}],"version-history":[{"count":0,"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/posts\/23004\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/media\/12633"}],"wp:attachment":[{"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/media?parent=23004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/categories?post=23004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/m9js.shop\/blog\/wp-json\/wp\/v2\/tags?post=23004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}