Mastering Spring Framework Fundamentals

Video description

By promoting excellent coding practices and speeding up development time, the Spring framework has proved its metal in the world of software development and is now the most in-demand skill for Java developers. If you’re looking to get to grips with Spring and the important techniques and best practices, then this is the right course for you.

You’ll start by configuring a project’s dependencies to use Spring. Next, you’ll understand the functionality and application of dependency injection and inversion of control in Spring. As you progress, you’ll manage application properties and state using Spring property management and learn how to apply profiles in Spring. You’ll also find out how to use proxies for making service methods transactional. Moving ahead, you’ll get to grips with lifecycle and callback interfaces and the events needed to integrate and access lower-level components of the Spring container. Later, you’ll get an overview of Spring JDBC and uncover techniques to work with databases. Finally, you’ll delve into web application development with Spring.

By the end of this course, you'll be able to confidently work with existing Spring applications and build your own projects from the ground up.

What You Will Learn

  • Use properties in Spring applications
  • Apply profiles in Spring applications to manage property sets
  • Find out how a Spring container is used in modern Java applications
  • Autowire dependencies in the Spring container
  • Apply Spring to tackle cross-cutting project concerns
  • Build a Maven project to use Spring MVC


This course is for anyone who wants to learn Spring from the ground up. Experienced developers who want to reinforce their knowledge of Spring fundamentals and developers who are transitioning into Java technology will also find this course useful. Basic knowledge of Java and OOP concepts is necessary to get started with this course.

About The Author

Matthew Speake: Matthew Speake is a Java technologist and trainer. He has over 20 years of experience working everywhere from small start-ups to large global corporations and is the principal trainer at Zention in the UK.

He started JavaEasily in 2018 to produce courses focused on teaching Java technology to students all around the world. Since then, JavaEasily has been busy creating and publishing courses and articles on different aspects of Java to help beginners and intermediate Java developers enhance their skills. JavaEasily helps you become a better Java developer by teaching you the core skills you need in order to succeed in your Java career.

Table of contents

  1. Chapter 1 : Getting Started
    1. Welcome to the Course
    2. Section Introduction
    3. Key Spring Resources You Will Need to Know
    4. Configuring a Project's Dependencies to Use Spring
    5. Adding the Spring BOM to Manage Dependency Versions Better
  2. Chapter 2 : Creating the Spring Container with Application Contexts
    1. Section Introduction
    2. A Look at the Application Context (also known as The Spring Container)
    3. Creating the File System XML Application Context
    4. Configuring Autocomplete while Writing Spring XML Configuration Files
  3. Chapter 3 : Creating, Retrieving, and Using Spring-Managed Beans
    1. Section Introduction
    2. Creating a Bean Managed Spring's XML Container Configuration
    3. Retrieving and Using a Bean from the Spring Container
    4. Using the Classpath XML Application Context
    5. Understanding the Singleton Scope
    6. Understanding the Prototype Scope
    7. Understanding How Spring Creates Stateless Beans
  4. Chapter 4 : Understanding Dependency Injection and Inversion of Control
    1. Section Introduction
    2. Coding Beans to Use Constructor Dependency Injection
    3. Interpreting a Spring Container Exception
    4. Applying Constructor Dependency Injection to XML Configuration
    5. Verifying the Constructor Dependency Injection with the Debugger
    6. Shareability of Beans in an Inversion of Control (IoC) Container
    7. The Benefits of Dependency Injection in an Inversion of Control (IoC) Container
    8. Alternatives to Using Constructor Dependency
    9. Coding Beans to Use Setter Dependency Injection
    10. Applying Setter Dependency Injection in XML Configuration
    11. Verifying the Setter Dependency Injection using the Debugger
  5. Chapter 5 : Auto-wiring Dependencies in the Spring Container
    1. Section Introduction
    2. Adding Component Scanning to Auto-detect Spring Managed Bean Annotations
    3. Coding Beans to be Auto-managed and Auto-wired by Spring through Annotations
    4. The Advantage of Annotation-based Configuration over XML Configuration
    5. Verifying the Annotation-driven Auto Wired Beans
    6. Spring's Stereotype Annotations for Better Code Readability
    7. Setter Dependency Injection with Annotations
    8. Constructor Dependency Injection with Annotations
    9. Using the Annotation-based Application Context
    10. Creating a Java Configuration Class
    11. Applying Java-based Configuration with @Bean
    12. Using Scopes with Java-based Configuration
    13. Modeling a More Complex Application to Demonstrate Auto-wiring Ambiguity Issues
    14. Resolving Ambiguous Arguments of the Same Type by Narrowing the Reference Type
    15. Resolving Ambiguous Arguments of the Same Type by Using @Qualifier
  6. Chapter 6 : Using Properties and Profiles in Spring Projects
    1. Section Introduction
    2. Injecting Properties Read from a Properties File with @Value in Spring Managed Bean
    3. Exploring Property Overriding in Spring
    4. Accessing and Using Properties with the Property Placeholder in XML Configuration
    5. Specifying Default Properties for Property Values
    6. Exceptions for Missing Property Keys in Spring
    7. Resolving and Using a Property Value in a Bean Definition in XML Configuration
    8. Accessing the Current Active Profiles using the Environment Interface
    9. Setting the Current Active Profile Programmatically and Through a Property Switch
    10. Creating Profile-specific Bean Configuration
    11. Conditional Beans with @Profile
  7. Chapter 7 : Getting to Know the Spring Container
    1. The Proxy Design Pattern
    2. Seeing Proxies in Action
    3. The Disadvantages of a Regular Proxy
    4. Understanding the Java Development Kit (JDK) Dynamic Proxies
    5. Dynamic Proxies in Spring
    6. Understanding how Spring Makes Service Methods Transactional using Proxies
    7. Spring-managed Bean Lifecycle Callback Methods
    8. The Java Development Kit (JDK) Standard Lifecycle Annotations (@PostConstruct and @PreDestroy)
    9. The Sequence of Spring Container Callbacks on a Spring-managed Bean
    10. Application Container Callbacks and Events
    11. Using the *Aware Interfaces to Access Lower-level Spring Framework Components
  8. Chapter 8 : Accessing Databases with Spring
    1. Creating and Configuring Data Sources
    2. Creating a Data Access Object to Access a Database
    3. Connecting Pool Data Sources in Spring
    4. Creating a Java Database Connectivity (JDBC) Template to Access a Database
    5. Using Java Database Connectivity (JDBC) Templates to Insert and Query Data
    6. Using Java Database Connectivity (JDBC) Data Access Object Pattern (DAO) Support to Remove Boilerplate JDBC Code
  9. Chapter 9 : Aspect-oriented Programming in Spring
    1. Preparing a Spring Project to Use Aspects
    2. Creating a Spring-managed Bean to be Intercepted
    3. Advising Beans in Spring
    4. Understanding Pointcuts and Joinpoints
    5. Accessing Joinpoints Programmatically within an Aspect
    6. Coding Dynamic Advice with Around
  10. Chapter 10 : Web Application Development in Spring
    1. Preparing a Maven Project to Use Spring Model-View-Controller (MVC)
    2. Registering the Dispatcher Servlet as the Front Controller
    3. Creating the Web Application Context
    4. Creating a Controller Class
    5. Configuring the Jetty Plug-in in Maven to Run a Web Application
    6. Setting Up Remote Debugging of a Web Application
    7. Understanding the Dispatcher Servlet Processing Flow
    8. Writing a Controller to Service Web Requests
    9. Rendering a Jakarta Server Pages (JSP) Based View with View Resolvers
    10. Understanding How a Request is Serviced
    11. Passing a Model to the View for More Dynamic Pages
    12. Injecting the HTTP Servlet Request and Response into a Controller
    13. Passing Request Parameters and Query Strings to a Controller
    14. Using Path Variables to Access Parts of the Request Path

Product information

  • Title: Mastering Spring Framework Fundamentals
  • Author(s): Matthew Speake
  • Release date: October 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781801079525