Securing the chat microservice

Okay, this chapter is titled Securing Your App with Spring Boot, yet we have spent a fair amount of time... NOT securing our app! That is about to change. Thanks to this little bit of restructuring, we can move forward with locking things down as desired.

Let's take a crack at writing some security policies, starting with the chat microservice:

    public class SecurityConfiguration { 
      SecurityWebFilterChain springWebFilterChain(HttpSecurity http) { 
        return http 

The preceding security policy can be defined as follows:

  • @EnableWebFluxSecurity activates the Spring WebFlux security filters needed to secure our ...

Get Developing Java Applications with Spring and Spring Boot now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.