Book Image

Learning Spring 5.0

By : Tejaswini Mandar Jog
Book Image

Learning Spring 5.0

By: Tejaswini Mandar Jog

Overview of this book

<p>Spring is the most widely used framework for Java programming and with its latest update to 5.0, the framework is undergoing massive changes. Built to work with both Java 8 and Java 9, Spring 5.0 promises to simplify the way developers write code, while still being able to create robust, enterprise applications.</p> <p>If you want to learn how to get around the Spring framework and use it to build your own amazing applications, then this book is for you.</p> <p>Beginning with an introduction to Spring and setting up the environment, the book will teach you in detail about the Bean life cycle and help you discover the power of wiring for dependency injection. Gradually, you will learn the core elements of Aspect-Oriented Programming and how to work with Spring MVC and then understand how to link to the database and persist data configuring ORM, using Hibernate.</p> <p>You will then learn how to secure and test your applications using the Spring-test and Spring-Security modules. At the end, you will enhance your development skills by getting to grips with the integration of RESTful APIs, building microservices, and doing reactive programming using Spring, as well as messaging with WebSocket and STOMP.</p>
Table of Contents (18 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
9
Explore the Power of RESTful Web Services

Spring Security mechanism


Spring Security is a very lengthy and complex process for us to put down every piece of it. We will discuss the process to get an overview of the factors to be considered while defining Spring Security in our application:

  • The entry point to start security starts from deployment descriptor, where the DelegatingFilterProxy filter has been mapped. It just delegates the requests to the Spring Security framework where all functionalities needed to perform security will be handled by filters that were defined in the application context.
  • Now the Spring application context searches for the bean configured with the name springSecurityFilterChain. It's actually an alias name for the bean that has been configured for the FilterChainProxy class, with its name as filterChainProxy. So, whenever the check is done, the filterChainProxy bean will be returned by the context once found. This bean consists of the information about the list of security filters that were defined in the...