Core Java Spring and Springboot_5Days_Siemens
Core Java Spring and Springboot_5Days_Siemens
Core Java 21 , Spring 6 and Spring Boot 3.x - 5 Days Hands-on Training
Lab Requirements:
o Set up Java environment on local machines.
Hands-On:
o Create a class, instantiate objects, and define methods.
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
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
o File Handling
Hands-On:
o Write a program to manipulate strings.
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
Hands-On:
o Write a multithreaded program demonstrating threads and
synchronization.
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
Hands-On:
o Write a program to connect to a database using JDBC.
o Testing Exceptions
Hands-On:
o Write unit tests using JUnit and mock dependencies with
Mockito.
o Demonstrate testing for exceptions in a program.
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
Hands-On:
o Set up a new Spring 6 project.
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.
Hands-On:
o Set up a simple Spring Boot 3.x project using Spring Initializr.
Hands-On:
o Add different starter dependencies and configure a custom auto-
configuration example.
o Customize an application using properties and environment profiles.
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
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.
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 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
Hands-On:
o Enable Actuator in the project and expose health, metrics, and
custom endpoints.
o Secure Actuator endpoints using Spring Security.
Hands-On:
o Write unit tests for services and controllers using JUnit and Mockito.
Hands-On:
o Enable DevTools in a Spring Boot project for live reloading.
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.