
Start a ten-step introduction to the spring framework, set up a simple spring project, and discover why spring is popular, with code in folder 0 1 spring for reference.
Create a Maven project for Java from start.spring.io, choose the latest Spring Boot version, set the group and artifact, then import into Eclipse and run to launch the Spring context.
Make the binary search use a configurable sort algorithm (bubble sort or quicksort) via a sort algorithm interface, demonstrating loose coupling and dependency injection.
Explore dynamic autowiring in Spring by type, resolve multiple beans with @Primary, and troubleshoot bean not found or multiple beans issues using @Component and @Autowired in real examples.
Explore spring boot for microservices and spring cloud for cloud native deployments. See how spring data, spring integration, spring batch, and spring security enable data access, integration, and security.
Explore why spring remains popular in the Java world by highlighting dependency injection that enables testable code and reduces plumbing, with modular architecture and Spring Cloud and Spring Boot support.
Discover how dependency injection wires a SortAlgorithm into a BinarySearchImpl and explore layered web, business, and data layers where controllers, services, and data services interact via JdbcTemplate.
Learn how Spring autowiring chooses an implementation for an interface by type, by name, and @Primary, using BubbleSortAlgorithm as the primary and QuickSortAlgorithm as fallback.
Contrast Spring context singleton with the Gang of Four singleton, explain scope proxy, and show per-application-context versus per-JVM behavior using JDBC connection examples.
Discover how component scan finds beans like ComponentDAO and ComponentJdbcConnection, explains the role of @Component and @Service, and shows how @SpringBootApplication defines default scanning and package inclusion.
Explore the Spring bean lifecycle managed by the IoC container, including autowiring dependencies and the PostConstruct and PreDestroy callbacks.
Explore context and dependency injection (CDI) in Spring, using @Named and @Inject, and compare CDI's standard annotations to Spring's @Component and @Autowired.
As we start removing Spring Boot and bringing in Spring core, you would see
Do not worry about them. We will fix them in Step 20.
Learn to close the Spring application context using AnnotationConfigApplicationContext and try-with-resources to auto close, and add logback-classic to enable logger.info in the Spring in 5 steps migration.
Load and wire beans with an XML application context by defining XMLPersonDAO and XMLJdbcConnection in applicationContext.xml, then instantiate and run them via ClassPathXmlApplicationContext.
Combine xml context with component scan to load beans defined by annotations and xml, log loaded beans, and transition toward Java-based configuration.
Learn inversion of control and how the IOC container wires dependencies. Compare bean factory and application context, and see how spring autowires beans, with features like internationalization and web contexts.
Create a Java project in Eclipse, implement a MyMath class with a sum method, and write a JUnit 5 test in a test folder using assertEquals to verify the result.
Explore how to use JUnit5 annotations, including @Test, before each, after each, before all, and after all, for test setup and cleanup, with static requirements and non-guaranteed test order.
Explore the popular Java mocking framework Mockito in five steps, learn why mocking matters for unit tests, and distinguish stubs from mocks across web, business, and data layers.
Set up a Spring Boot project with Spring Initializr and Maven, configure business and data layers, and write and test a unit with Mockito in a mockito-demo project.
Create a Mockito mock for DataService, configure when retrieveAllData is called, and return a value. Demonstrate how mocks simplify unit tests, enable new scenarios, and improve maintainability compared to stubs.
Leverage Mockito annotations such as @Mock and @InjectMocks with the Mockito extension and JUnit extension to automate mock creation and injection, simplifying unit tests for the business implementation.
Master Mockito mocking in java by testing java.util.List: create list mocks, stub size and get methods with when-thenReturn, and return multiple values. Explore parameter handling with Mockito.any for unit tests.
Explore spring unit testing with Java context, xml context, and Mockito after covering JUnit and Mockito prerequisites.
Explore the world before Spring Boot with dependency management in pom.xml, web.xml and DispatcherServlet configurations, plus essential non-functional features like logging, error handling, monitoring, and metrics.
Learn to manage complex application configuration with Spring Boot using @ConfigurationProperties and profiles, mapping currency-service properties (url, username, key) to a centralized CurrencyServiceConfiguration.
Explore the fundamentals of aspect-oriented programming with Spring AOP, including pointcuts, aspects, and advice. Learn key annotations such as @Before and @Around, and review best practices for using Spring AOP.
Explore aspect oriented programming and its role in implementing cross cutting concerns like security, performance, and logging across web, business, and data layers with Spring AOP and AspectJ.
Build a Spring AOP example by creating a business service and a data service, wire them via constructor injection with @Service and @Repository, and log the max of hardcoded data.
Explore aspect oriented programming terminology, including advice, pointcut, aspect, weaver, and join point, with examples of intercepting method calls and logging arguments.
Explore how @After, @AfterReturning, and @AfterThrowing AOP annotations run after a method, on success, or on exception, using joinPoint and pointcut concepts.
Explore the basics of spring-jdbc, compare it with jdbc, and implement crud using a spring-jdbc dao, a jpa repository, and a spring data repository, with code hosted on GitHub.
Insert data into the person table using a structured insert query and seed three rows via data.sql, then restart the app to persist initial data for JDBC practice.
Implement a findAll method in PersonJdbcDao using Spring JDBC template to run select star from Person and map results to the Person bean with bean property row mapper.
Explore how Spring Boot auto configuration wires the JDBC template to an embedded H2 data source, driven by classpath conditions and configuration reports, with debugging mode and H2 console enabled.
Implement a findById method in spring jdbc using JdbcTemplate's queryForObject with a single id parameter to retrieve a specific person and map it with a row mapper.
Connect Spring Boot applications to external databases by switching from H2 to MySQL, SQL Server, or Oracle using simple properties and dependencies.
Do you want to become an Expert on the Spring Framework? Do you want to become a Modern Spring Developer? Join the course to learn Spring Framework the Modern Way - The way Real World Java Projects use it!
Learn the magic of Spring Framework. From IOC (Inversion of Control), DI (Dependency Injection), Application Context to the world of Java Spring Boot, Spring AOP, Spring JDBC and JPA. Get set for an incredible journey.
WHAT OUR LEARNERS ARE SAYING:
5 STARS - This is so far the best Spring course I have been taking. Start from simple and easy, yet in-depth explanation. Really well-designed! Recommend to anyone like me that have a medium java background (learned from school class), but completely new to Spring. And it is also a great practice for what I learned from our OOAD course at school. Now it is crystal clear to me!! Highly recommended!
5 STARS - Excellent In-depth, Real World Oriented Course with Excellent teaching style with crystal clear explanations - in general a course cannot be better than this in my opinion. Thank you for this superb training experience Ranga.
5 STARS - The instructor is very knowledgeable, and what makes this course a winner is the scope of each example along with its explanation. The lectures are short, and enough to introduce and understand the topic to make it functional. It really helps that it is hands-on, and I had no trouble or errors running any of the code. You learn the essentials to work with Spring, but also guides you through Eclipse and shortcuts which are very useful. The pace and length of the lectures are perfect! Extremely well done! This knowledge would have taken me a lot longer to learn were it not for this course, Thank you Ranga!
5 STARS - I know a lot more about dependency injection, IOC, loose-coupling, and application context thanks to Ranga. He has changed my life. I am now more knowledgeable about Spring framework and am really confident in my interviews. He deserves every penny from me and needs to become a millionaire for making me position myself to potentially becoming a Spring Guru.
5 STARS - This course shifted me to a new level of understanding Spring. Great tutor.
5 STARS - Great course and to the point, which is helpful if you need to brush up/learn all you need fast all while understanding the fundamental concepts about spring/spring mvc/spring boot and their related technologies.
COURSE OVERVIEW:
In this course, you will learn the features of Spring, Spring Boot and Spring Modules - JDBC, AOP, Data JPA with hands-on step by step approach.
You will get introduced to Spring Boot, Unit Testing with JUnit and Mockito, talking to the database with Spring JDBC and JPA, Maven (dependencies management), Eclipse (IDE) and Tomcat Embedded Web Server. We will help you set up each one of these.
You will learn about Spring step by step - in more than 100 steps. This course would be a perfect first step as an introduction to Spring.
You will learn about
Basics of Spring Framework - Dependency Injection, IOC Container, Application Context and Bean Factory.
Spring Annotations - @Autowired, @Component, @Service, @Repository, @Configuration, @Primary....
Spring MVC in depth - DispatcherServlet , Model, Controllers and ViewResolver
Spring Boot Starters - Spring Boot Starter Web, Starter Data Jpa, Starter Test
Basics of Spring Boot, Spring AOP, Spring JDBC and JPA
Basics of Eclipse, Maven, JUnit and Mockito
Basic concept of a Web application step by step using JSP Servlets and Spring MVC
Unit testing with JUnit and Mockito using XML and Java Spring Application Contexts
COURSE HIGHLIGHTS:
Level 1 : Spring Framework in 10 Steps
Step 1 - Setting up a Spring Project
Step 2 - Understanding Tight Coupling using the Binary Search Algorithm Example
Step 3 - Making the Binary Search Algorithm Example Loosely Coupled
Step 4 - Using Spring to Manage Dependencies - @Component, @Autowired
Step 5 - What is happening in the background?
Step 6 - Dynamic auto wiring and Troubleshooting - @Primary
Step 7 - Constructor and Setter Injection
Step 8 - Spring Modules
Step 9 - Spring Projects
Step 10 - Why is Spring Popular?
Level 2 : Spring in Depth
Step 11 - Dependency Injection - A few more examples
Step 12 - Autowiring in Depth - by Name and @Primary
Step 13 - Autowiring in Depth - @Qualifier annotation
Step 14 - Scope of a Bean - Prototype and Singleton
Step 15 - Complex scenarios with Scope of a Spring Bean - Mix of Prototype and Singleton
Step 15B - Difference Between Spring Singleton and GOF Singleton
Step 16 - Using Component Scan to scan for beans
Step 17 - Lifecycle of a Bean - @PostConstruct and @PreDestroy
Step 18 - Container and Dependency Injection (CDI) - @Named, @Inject
Step 19 - Removing Spring Boot in Basic Application
Step 20 - Fixing minor stuff - Add Logback and Close Application Context
Step 21 - Defining Spring Application Context using XML - Part 1
Step 22 - Defining Spring Application Context using XML - Part 2
Step 23 - Mixing XML Context with Component Scan for Beans defined with Annotations
Step 24 - IOC Container vs Application Context vs Bean Factory
Step 25 - @Component vs @Service vs @Repository vs @Controller
Step 26 - Read values from external properties file
Level 3 has 3 steps on Unit Tests with Java and XML Contexts
Level 4 : Spring Boot in 10 Steps
Step 1 : Introduction to Spring Boot - Goals and Important Features
Step 2 : Developing Spring Applications before Spring Boot
Step 3 : Using Spring Initializr to create a Spring Boot Application
Step 4 : Creating a Simple REST Controller
Step 5 : What is Spring Boot Auto Configuration?
Step 6 : Spring Boot vs Spring vs Spring MVC
Step 7 : Spring Boot Starter Projects - Starter Web and Starter JPA
Step 8 : Overview of different Spring Boot Starter Projects
Step 9 : Spring Boot Actuator
Step 10 : Spring Boot Developer Tools
Level 5 : Spring AOP
Step 01 - Setting up AOP Example - Part 1
Step 02 - Setting up AOP Example - Part 2
Step 03 - Defining an @Before advice
Step 04 - Understand AOP Terminology - Pointcut, Advice, Aspect, Join Point, Weaving and Weaver
Step 05 - Using @After, @AfterReturning, @AfterThrowing advices
Step 06 - Using @Around advice to implement performance tracing
Step 07 - Best Practice : Use common Pointcut Configuration
Step 08 - Quick summary of other Pointcuts
Step 09 - Creating Custom Annotation and an Aspect for Tracking Time
Level 6 :Spring JDBC and JPA
Step 01 - Setting up a project with JDBC, JPA, H2 and Web Dependencies
Step 02 - Launching up H2 Console
Step 03 - Creating a Database Table in H2
Step 04 - Populate data into Person Table
Step 05 - Implement findAll persons Spring JDBC Query Method
Step 06 - Execute the findAll method using CommandLineRunner
Step 07 - A Quick Review - JDBC vs Spring JDBC
Step 08 - Whats in the background? Understanding Spring Boot Autoconfiguration
Step 09 - Implementing findById Spring JDBC Query Method
Step 10 - Implementing deleteById Spring JDBC Update Method
Step 11 - Implementing insert and update Spring JDBC Update Methods
Step 12 - Creating a custom Spring JDBC RowMapper
Step 13 - Quick introduction to JPA
Step 14 - Defining Person Entity
Step 15 - Implementing findById JPA Repository Method
Step 16 - Implementing insert and update JPA Repository Methods
Step 17 - Implementing deleteById JPA Repository Method
Step 18 - Implementing findAll using JPQL Named Query
Step 19 - Introduction to Spring Data JPA
Step 20 - Connecting to Other Databases
Start Learning Now. Hit the Enroll Button!