Skip to Main Content
Spring 5.0 By Example
book

Spring 5.0 By Example

by Claudio Eduardo de Oliveira
February 2018
Intermediate to advanced content levelIntermediate to advanced
356 pages
9h 10m
English
Packt Publishing
Content preview from Spring 5.0 By Example

Configuring the security

Let's start coding our Auth microservice. We will start with the authorization and authentication, as we want to protect all resources in our microservices, then we will configure WebSecurityConfigureAdapter. The class should look like this:

package springfive.airline.authservice.infra.security;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Configuration;import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;import org.springframework.security.config.annotation.web.builders.HttpSecurity;import org.springframework.security.config.annotation.web.configuration. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Spring

Beginning Spring

Mert Caliskan, Kenan Sevindik, Rod Johnson, Jürgen Höller
Mastering Spring 5.0

Mastering Spring 5.0

In28Minutes Official
Spring 5.0 Cookbook

Spring 5.0 Cookbook

Sherwin John Calleja Tragura

Publisher Resources

ISBN: 9781788624398Supplemental Content