Hands-On Spring Security 5.x

Video description

Securing your application from hackers is the most high-pressure concerns for developers. In this course, you’ll learn how to protect your Java application from malicious attacks and users with the Spring Security framework.

You’ll integrate Spring Security into your application using the Spring frameworks through practical, hands-on examples. You’ll see how to secure your web application, integrate authentication and authorization mechanisms, and restrict access to your application. You’ll discover how to integrate it with popular frameworks such as Spring Web MVC, Spring-Boot, Spring-Data, Servlet API injection, and more.

We’ll cover the security challenges with Reactive web apps built for the cloud, RESTful web services, and microservice architectures with the Spring framework. You’ll also implement techniques for protection against attacks such as session fixation, clickjacking, cross-site request forgery, and more.

By the end of the course, you’ll understand common security vulnerabilities and be able to prevent them with Spring Security, with an empirical approach to securing your web applications.

What You Will Learn

  • Get to know Spring Security and its concepts
  • Explore Spring Security Advanced configuration tips
  • Distinguish between Authorization and Authentication
  • Implement a custom Authentication mechanism
  • Integrate OAuth2 mechanism with your application to make it more secure
  • Define roles with Spring Security Authorization
  • Prevent common attacks such as CORS and CSRF with proper spring-security configuration


This course is for Java and Kotlin developers who can build applications using Java and Spring Framework and now want to secure their applications. No previous experience with Spring Security is assumed.

About The Author

Tomasz Lelek: Tomasz Lelek is a Software Engineer who programs mostly in Java and Scala. He is a fan of microservice architectures and functional programming. He dedicates considerable time and effort to being better every day. Recently, he's been delving into big data technologies such as Apache Spark and Hadoop. He is passionate about nearly everything associated with software development.

Tomasz thinks that we should always try to consider different solutions and approaches before solving a problem. Recently, he was a speaker at several conferences in Poland - Confitura and JDD (Java Developer's Day) and also at Krakow Scala User Group. You can find the JDD video here: https://www.youtube.com/watch?v=BnORjQbnZNQ&t - ML Spark talk.

He also conducted a live coding session at Geecon Conference. He is currently working on this website using ML: http://www.allegro.pl

Publisher resources

Download Example Code

Product information

  • Title: Hands-On Spring Security 5.x
  • Author(s): Tomasz Lelek
  • Release date: January 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781789802931