Skip to content

Instantly share code, notes, and snippets.

View ggffggg00's full-sized avatar

Borisov Vladislav ggffggg00

  • Sber
  • Novosibirsk, Russia
View GitHub Profile
@msievers
msievers / [Spring Boot, Kubernetes] Make a Spring Boot app expose apis on different ports utilizing HandlerInterceptor.md
Created February 15, 2019 10:03
[Spring Boot, Kubernetes] Make a Spring Boot app expose apis on different ports utilizing HandlerInterceptor

Motivation

Assume you have a Spring Boot application which exposes multiple apis, for example one for dogs and one for cats. Let's further assume that the api base paths look something like this

  • /api/cats/v1/
  • /api/dogs/v1/

Especially within kubernetes, it would be slick to be able to expose these apis using dedicated services. Let's recap a simple kubernetes service definition.