본문 바로가기

개발 가이드/Spring Cloud3

Spring Cloud Gateway 완전 가이드 3 9. Spring Security + JWT 인증마이크로서비스 환경에서는 모든 서비스가 각각 인증 로직을 구현하면 중복 코드와 보안 관리 문제가 발생합니다.일반적으로 API Gateway에서 인증을 담당하고, Backend 서비스에는 인증된 사용자 정보만 전달하는 구조를 사용합니다.Client ↓ Spring Cloud Gateway JWT 검증 권한 검사 Header 전달 ↓ MicroserviceJWT 인증 처리 흐름사용자가 로그인하여 JWT Token 발급Client가 API 요청 시 Authorization Header 전달Gateway Filter에서 JWT 검증검증 성공 시 Backend 서비스 호출사용자 정보 Header 전달JWT Authentication Filter 예제@Co.. 2026. 8. 3.
Spring Cloud Gateway 완전 가이드 2 4. Spring Cloud Gateway 프로젝트 구성Spring Cloud Gateway 프로젝트는 Spring Boot 기반으로 생성하며 WebFlux 기반으로 동작하기 때문에 Spring MVC와는 다른 구조를 사용합니다.Maven 의존성 설정 org.springframework.cloud spring-cloud-starter-gateway org.springframework.boot spring-boot-starter-actuator Gradle 설정dependencies { implementation( .. 2026. 8. 3.
Spring Cloud Gateway 완전 가이드 Microservice API Gateway GuideSpring Cloud Gateway 완전 가이드Spring Cloud Gateway는 Spring WebFlux 기반의 API Gateway 프레임워크로, 마이크로서비스 환경에서 라우팅, 인증, 필터링, 트래픽 제어, 모니터링을 담당하는 핵심 플랫폼입니다. Spring Cloud API Gateway Routing Filter Security Monitoring Spring Cloud Gateway란? Spring Cloud Gateway는 클라이언트 요청을 받아 적절한 마이크로서비스로 전달하는 API Gateway 역할을 수행합니다.기존 Spring MVC 기반 Gateway와 달리 WebFlux와 Reactor 기반의 논블로킹.. 2026. 8. 3.