Using Spring Session

Before we can dig into those nice security policies and authorization rules we just talked about, we need a solution to secure multiple microservices.

What is the exact problem? When we log in to the first piece of our social media platform, we want that status to be carried through to the other components with ease.

The solution is Spring Session (http://projects.spring.io/spring-session/), which supports multiple third-party data stores to offload session state including Redis, MongoDB, GemFire, Hazelcast, and others. Instead of the session data being stored in memory, it is externalized to a separate data store.

This provides multiple benefits such as the following:

  • Provides scalability when running multiple instances ...

Get Learning Spring Boot 2.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.