Course Title:
Core Java 21 , Spring 6 and Spring Boot 3.x - 5 Days Hands-on Training
Day 1: Core Java Fundamentals
Prerequisites:
Installed Java Development Kit (JDK)
IDE (Eclipse/IntelliJ IDEA) or text editor (VSCode, Notepad++)
Understanding of basic programming concepts (optional)
Morning Session (9:00 AM – 12:30 PM)
1. Java Overview
Duration: 45 mins
Topics:
o History of Java
o Features of Java (Platform Independence, Object-Oriented,
etc.)
o JDK, JRE, and JVM: Differences and Use Cases
o Installation & Environmental Setup
Lab Requirements:
o Set up Java environment on local machines.
o Verify the setup by running a simple Java program (e.g.,
"Hello, World!").
2. Java Basics
Duration: 1.5 hours
Topics:
o Variables, Data Types, and Operators
o Control Statements (if, else, switch, loops: for, while, do-
while)
Hands-On:
o Write a program demonstrating variables, data types, and
operators.
o Create a program using control statements for decision
making.
3. Java Object-Oriented Programming (OOP)
Duration: 1 hour
Topics:
o Introduction to OOP (Encapsulation, Abstraction,
Inheritance, Polymorphism)
o Classes and Objects: Definition, Methods, and Constructor
Hands-On:
o Create a class, instantiate objects, and define methods.
Afternoon Session (1:30 PM – 5:00 PM)
4. Inheritance and Polymorphism
Duration: 1 hour
Topics:
o Inheritance: extends keyword, Single and Multilevel
Inheritance
o Polymorphism: Overloading and Overriding
Hands-On:
o Create a base class and derived classes demonstrating
inheritance.
o Implement method overloading and overriding in a class
hierarchy.
5. Exception Handling
Duration: 1 hour
Topics:
o Types of Exceptions: Checked and Unchecked
o try, catch, finally, throw, throws
Hands-On:
o Create programs demonstrating exception handling with
custom exceptions.
Case Study:
Duration: 1 hour
Description:
o Develop a mini console-based application (e.g., Banking
system, Library management) using the OOP concepts,
inheritance, polymorphism, and exception handling.
Day 2: Advanced Java Concepts and Java Libraries
Prerequisites:
IDE (Eclipse/IntelliJ IDEA) or text editor
Database server (MySQL, PostgreSQL, etc.) installed
Tomcat or any web server installed for servlet execution
Morning Session (9:00 AM – 12:30 PM)
1. Java Libraries
Duration: 1 hour
Topics:
o Core Classes (String, wrapper classes, Date, Time, Instant,
time zones)
o Serialization
o File Handling
Hands-On:
o Write a program to manipulate strings.
o Implement file handling (reading/writing files) and
serialization.
2. Java Collections Framework
Duration: 1 hour
Topics:
o Collection Interfaces: Set, List, and Map
o Implementations: ArrayList, HashSet, HashMap
Hands-On:
o Create programs that utilize collections such as List, Set,
and Map.
3. Java Generics and Thread Basics
Duration: 1 hour
Topics:
o Java Generics: Type Safety, Bounded Types
o Threads: Multithreading, Runnable Interface, Thread Class
Hands-On:
o Write a multithreaded program demonstrating threads and
synchronization.
Afternoon Session (1:30 PM – 5:00 PM)
4. Streams and Lambda Expressions
Duration: 45 mins
Topics:
o Introduction to Streams
o Lambda Functions in Java
Hands-On:
o Use Streams and Lambda expressions to filter and process
data from a collection.
5. Java Frameworks
Duration: 45 mins
Topics:
o JDBC: Connecting Java with a Database
o Web Programming: Servlets and JSP Overview
Hands-On:
o Write a program to connect to a database using JDBC.
o Demonstrate a simple servlet in a Tomcat server.
6. Unit Testing with JUnit and Mockito
Duration: 1 hour
Topics:
o JUnit Basics: Writing Unit Tests
o Mockito: Mocking Objects for Testing
o Testing Exceptions
Hands-On:
o Write unit tests using JUnit and mock dependencies with
Mockito.
o Demonstrate testing for exceptions in a program.
7. Java Build Systems (Maven)
Duration: 1 hour
Topics:
o Maven Basics: POM.xml, Dependency Management
o Maven Build Life Cycle
Hands-On:
o Set up a Maven project and manage dependencies.
Case Study:
Duration: 1 hour
Description:
o Develop a small web application (e.g., Student Management
System) using JDBC, servlets, JSP, and test it using JUnit and
Mockito.
Lab Requirements:
Java IDE installed (Eclipse/IntelliJ IDEA)
MySQL/PostgreSQL or any RDBMS for database-related hands-on
sessions
Web server (Apache Tomcat) for Servlet/JSP hands-on
Maven installed for dependency management
End of Day 2: Wrap-up and Q&A
Day 3
Core Spring 6 In-Depth Course Content (4 hours)
Prerequisites:
Understanding of Java basics and object-oriented programming
Experience with Spring Framework basics (Spring Core, Dependency
Injection)
IDE (IntelliJ IDEA/Eclipse) with Spring Boot plugin
Maven or Gradle installed for project setup
Course Schedule (4 hours)
1. Overview of Spring 6 and New Features
Duration: 2 Hours
Topics:
o Introduction to Spring 6
o Key Changes and Enhancements in Spring 6
o JDK 17+ Requirements
o New Features in Spring Core and Spring Boot 3 (Spring Boot 3
compatibility)
Hands-On:
o Set up a new Spring 6 project.
o Explore basic project structure and run a Bean Factory and
Application Context.
2. Advanced Spring Core Concepts
Duration: 2 Hours
Topics:
o Advanced Dependency Injection techniques (Constructor Injection,
Setter Injection, Field Injection)
o Component Scanning and Stereotype Annotations (@Component,
@Repository, @Service, @Controller)
o Scopes in Spring (@Scope, Singleton vs Prototype)
o Custom Bean Lifecycle Callbacks (@PostConstruct, @PreDestroy)
o Using @Configuration and @Bean in-depth for bean creation
Hands-On:
o Create a project demonstrating advanced DI techniques, including
Constructor Injection and custom bean lifecycle management.
o Implement custom scopes and showcase bean lifecycle with
@PostConstruct and @PreDestroy.
Spring Boot 3.x Course Content for 2.5 Days
Prerequisites:
Basic knowledge of Java and OOP concepts
Understanding of Spring Framework basics (Spring Core, Dependency
Injection, MVC)
Familiarity with web development concepts (HTML, HTTP, REST)
IDE (Eclipse/IntelliJ IDEA) with Maven/Gradle support
Basic knowledge of databases (SQL queries, transactions)
Maven or Gradle installed for project setup
Lab Requirements:
Java Development Kit (JDK 17+) installed
IDE (IntelliJ IDEA, Eclipse) with Spring Boot plugins
Maven or Gradle installed
MySQL/PostgreSQL database installed for data-related exercises
Postman for testing APIs
Docker (optional) for containerizing applications
GraalVM installed for Native Image support (optional)
Course Schedule (2.5 Days)
Day 3: Introduction and Core Concepts
Afternoon Session (1:30 PM – 05:00 PM)
1. Introduction to Spring Boot 3.x
Duration: 45 mins
Topics:
o Overview of Spring Boot and its evolution
o Key features of Spring Boot 3.x
o Understanding Spring Boot’s auto-configuration and embedded
server support (Tomcat, Jetty)
o Spring Boot 3.x and JDK 17 compatibility
Hands-On:
o Set up a simple Spring Boot 3.x project using Spring Initializr.
o Run and configure your first Spring Boot application.
o Explore application.properties and application.yml files.
2. Spring Boot Auto-Configuration and Starter Dependencies
Duration: 45 mins
Topics:
o Understanding Spring Boot Starter POMs (dependencies)
o How auto-configuration works under the hood
o Customizing auto-configuration (exclude/include beans)
Hands-On:
o Add different starter dependencies and configure a custom auto-
configuration example.
o Customize an application using properties and environment profiles.
3. Spring Boot Application Structure and Command Line Runner
Duration: 1 hour
Topics:
o Spring Boot project structure and packaging (JAR/WAR)
o @SpringBootApplication annotation explained
o Understanding Command Line Runner and Application Runner
Hands-On:
o Create a Command Line Runner to run custom code during
application startup.
o Explore the structure of a Spring Boot JAR application.
Day 4
Morning Session (9:00 PM - 12:30 PM)
4. RESTful Web Services with Spring Boot
Duration: 2.5 hours
Topics:
o Building RESTful APIs using @RestController and @RequestMapping
o Handling HTTP methods (GET, POST, PUT, DELETE)
o Validating request data with @Valid and @Validated
Hands-On:
o Create a simple CRUD API (e.g., for managing employees or
products) using Spring Boot REST controllers.
o Implement request validation with @Valid annotations.
Advanced Spring Boot Concepts
Afternoon Session (1:30 PM - 05:00 PM)
5. Spring Boot Data Access with Spring Data JPA
Duration: 1.5 hours
Topics:
o Introduction to Spring Data JPA
o Setting up a database connection (MySQL/PostgreSQL)
o @Entity, @Repository, and JpaRepository explained
o Query methods and JPQL
o Pagination and Sorting in repositories
Hands-On:
o Create a CRUD repository using Spring Data JPA to manage entities
in a database.
o Demonstrate pagination and sorting using repository methods.
o Configure database properties in application.yml.
6. Spring Boot Security (Spring Security 6)
Duration: 1.5 hours
Topics:
o Introduction to Spring Security 6 and key updates in Spring Boot 3.x
o Securing REST APIs using Spring Security with JWT (JSON Web
Tokens)
o Configuring authentication and authorization with role-based access
control
o Custom login/logout pages
Hands-On:
o Secure the previously developed CRUD API using Spring Security
with JWT-based authentication.
o Create roles for admin and user, and implement role-based access
control.
Day 5
Morning Session (9:00 AM - 12:30 PM)
7. Spring Boot Actuator
Duration: 45 mins
Topics:
o Introduction to Spring Boot Actuator for monitoring and metrics
o Exposing health, info, and custom metrics
o Configuring security for Actuator endpoints
Hands-On:
o Enable Actuator in the project and expose health, metrics, and
custom endpoints.
o Secure Actuator endpoints using Spring Security.
8. Spring Boot Testing with JUnit and Mockito
Duration: 1 hour
Topics:
o Unit testing in Spring Boot with JUnit 5
o Mocking dependencies using Mockito
o Testing Spring Boot controllers and services
o Writing integration tests with @SpringBootTest
Hands-On:
o Write unit tests for services and controllers using JUnit and Mockito.
o Test RESTful APIs using MockMvc.
o Perform an integration test using @SpringBootTest.
9. Spring Boot DevTools and Profiles
Duration: 45 mins
Topics:
o Introduction to Spring Boot DevTools for rapid application
development
o Configuring and using environment-specific profiles (dev, prod)
o Hot reloading with DevTools
Hands-On:
o Enable DevTools in a Spring Boot project for live reloading.
o Create environment-specific configurations using Spring profiles
(dev, prod).
Afternoon Session (1:30 PM - 5:00 PM)
10. Case Study: Building a Full-Stack Spring Boot Application
Duration: 1.5 hours
Description:
o Scenario: Build a full-stack employee management system with
the following features:
RESTful API for managing employee data (CRUD operations)
Secure the API with JWT-based authentication and role-based
access control
Persist data using Spring Data JPA connected to a
MySQL/PostgreSQL database
Expose health and metrics using Spring Boot Actuator
Write unit and integration tests to ensure code quality
Dockerize the application for deployment using Docker
Compose
Hands-On:
o Set up the project using Spring Boot 3.x.
o Implement the RESTful API with Spring Data JPA and secure it with
Spring Security JWT.
o Write unit and integration tests for the project.
o Monitor the application with Actuator endpoints.
Wrap-up and Q&A
Duration: 30 mins
Review key concepts learned over the 2.5 days.
Answer participant questions and discuss further learning paths (Spring
Cloud, Spring Security advanced topics, etc.).