Spring Rest API 설계

MSA School 마이크로서비스 아키텍처

http://www.msaschool.io/operation/design/design-five/

image-20220510150214196

카카오 광고 플랫폼 MSA

https://www.slideshare.net/ifkakao/msa-api-gateway

image-20220510150041166

구현해볼 설계

인증방식: OAuth2 + JWT

API Gateway : Spring Cloud Gateway

역할:

참조: MSA 아키텍쳐의 API Gateway, Gateway JWT 인증

Authentication Server: Spring Security

역할:

참조: 인증서버 구축

Backend Restful API: Spring boot

  • 전자영수증
  • 원터치페이
  • 배달

Front : Vue 3 + Vuetify 3 + typescript

Web Server: Nginx

기타:

  • OpenFeign : Spring-Cloud의 OpenFeign 은 Netflix 에서 개발한 Microservice 용 HTTP Client 이다.
    • 인터페이스만으로 클라이언트를 구현할 수 있는 어노테이션 지원
    • Blocking 방식의 HTTP Client
    • Spring MVC 의 HttpMessageConverters 를 제공
    • ErrorDecoder 를 통한 통합 예외 처리

https://spring.io/projects/spring-cloud-openfeign#support

https://docs.spring.io/spring-cloud-openfeign/docs/current/reference/html/

Feign Client 다중 호출 성능 최적기

Feign 외부 API 호출

image-20220511093654146

https://www.baeldung.com/spring-cloud-gateway-oauth2

https://roytuts.com/spring-cloud-gateway-security-with-jwt-json-web-token/