0% found this document useful (0 votes)
12 views6 pages

Core Java & Spring Boot Training Outline

Pink board training is devices

Uploaded by

Ranjeet Kr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Core Java & Spring Boot Training Outline

Pink board training is devices

Uploaded by

Ranjeet Kr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COURSE OUTLINE

COURSE NAME: Customized Core Java & Spring Boot Training


Duration: 40 Hours
Course Outline: Core Java

Day/Time Topic Details Banking Application Case Study Hands-on/Deliverables

Day 1 (4 Hours)

- Object-Oriented
Concepts: Objects, Classes, - Identify - Write a simple Java class
Methods entities: Bank, Customer, Account for Customer.
1st Hour OOP Basics
- - Create the Customer class with - Use constructors to initialize object
Constructor and Initializati attributes name, id, and address. states.
on
- Inheritance: Superclass - Implement method overloading (e.g.,
- Create a base Accountclass.
Inheritance & and Subclass - multiple versions of deposit).
2nd Hour - Polymorphism: Method
Polymorphism Implement SavingsAccount and Curr - Override methods
Overloading and
entAccount as subclasses. (e.g., getAccountType).
Overriding
- Define
- Abstract Class vs Interface - Create abstract methods in Account.
an AccountOperationsinterface
Abstract Classes - Multiple Inheritance via -
3rd Hour & Interfaces Interfaces with deposit(), withdraw(), getBalanc
Implement AccountOperationsin Savin
e().
- Functional Interfaces gsAccount and CurrentAccount.
- Implement Account class.
- Introduction to
- UML diagram for classes involved in
the Banking System Case - Create a class diagram
Banking App the banking system.
4th Hour Study showing Customer, Account,
Design - Identify relationships (e.g., customer
- Entities, Relationships, and Bank.
can have multiple accounts).
and Use Cases
Day 2 (4 Hours)

- Types of Exceptions: -
Exception - Handle errors like Insufficient
Checked vs Unchecked Implement InsufficientBalanceExceptio
1st Hour Balance and Invalid Account using
Handling Basics - Try, Catch, Finally nand InvalidAccountExceptionwith
custom exceptions.
- Custom Exceptions proper error messages.
- Implement exception handling
Exception - Handling exceptions in - Integrate custom exceptions into
during transactions (e.g.,
2nd Hour Handling in banking operations the withdraw() and transfer()methods
withdrawing more than available
Banking App - Transaction safety of the Account class.
balance).
- Collection Interfaces: List,
Set, Map - Store transaction history for each
- Use an ArrayList to maintain
- account using a List.
3rd Hour Java Collections transaction history and HashMapto
ArrayList, HashSet, HashM - Use Map to store customer
store accounts by customer ID.
ap accounts in the bank system.
- Iterators
Collections in - Use of collections - Sort customers by account balance - Implement Comparator to sort
4th Hour for banking data using Comparator. accounts by balance.
Banking App
- Sorting and searching - Search for customers by name - Implement a search feature
data using a Map. using HashMap to find customers by
using Comparable and Com name.
parator
Day 3 (4 Hours)

- Creating Threads - Simulate a scenario where multiple - Create multiple threads simulating
Multithreading
1st Hour via Runnable and Thread customers perform transactions on different customer transactions
Basics
- Thread Lifecycle their accounts concurrently. (deposit, withdraw, transfer).
-
- Synchronized Methods - Ensure thread safety during
Thread Synchronize withdraw() and deposit()
2nd Hour - Avoiding Race Conditions concurrent transactions (e.g.,
Synchronization methods to avoid data corruption in a
- Deadlock Prevention simultaneous deposits/withdrawals).
multithreaded environment.
- Introduction
Executor to ExecutorService - Use ExecutorService to manage - Implement a thread pool
3rd Hour Framework - Callable, Future threads efficiently in the banking app using ExecutorService to handle
- (e.g., batch processing transactions). multiple transaction requests.
ScheduledExecutorService
- Simulate multiple - Use the Executor Framework for - Implement thread pooling for
Banking App:
4th Hour customers performing handling multiple concurrent managing concurrent banking
Multithreading
operations concurrently customer transactions. operations using ExecutorService.
Day 4 (4 Hours)

- Use CountDownLatch to ensure all


Concurrency - Introduction - Implement semaphore to limit the
1st Hour transactions complete before closing
to CountDownLatch, Cyclic number of active transactions in the
Utilities the bank’s transaction processing for
Barrier, Semaphore bank at any given time.
the day.
- Simulate high-volume
Concurrency in - Handle high transaction transactions and ensure smooth
- Use CyclicBarrier to manage batch
2nd Hour volume efficiently using processing for large transactions (e.g.,
Banking App handling using Java concurrency
concurrency utilities processing at day-end).
utilities.
- New String - Use the new HTTP Client API to - Integrate Java 11’s HTTP Client to
Methods: strip(), isBlank(),
3rd Hour Java 11 Features simulate interactions with an check customer credit ratings and
repeat()
external credit rating system. validate transactions.
- HTTP Client API
- Review the full banking - Complete the banking application
Final - Finalize the banking system
system with all features: customer
4th Hour Implementation implementationwith multithreading,
- Optimize code and management, transactions, and
& Review exceptions, and collections.
performance concurrency handling.

Detailed Scenario of the Banking Case Study:

Entities:

 Customer: A person who holds one or more accounts.


 Account: Represents the customer’s bank account (either savings or current).
 Bank: Manages customer accounts and handles transactions.

Features:

 Transaction History: Store and retrieve transaction history using collections.


 Concurrency: Handle multiple customer transactions simultaneously using multithreading.
 Exception Handling: Ensure safety by preventing illegal operations (e.g., overdraft) via custom exceptions.
 Concurrency Utilities: Manage high-volume transactions with advanced concurrency utilities (e.g., semaphores, barriers).
Outcomes:

 By the end of this plan, you’ll have a fully functional banking application that includes:
 OOP Concepts: Full application of inheritance, polymorphism, abstract classes, and interfaces.
 Exception Handling: Custom exceptions for account validation and transaction safety.
 Multithreading: Efficient management of concurrent customer transactions.
 Executor Framework: Optimization of multi-threaded transactions using thread pools.
 Java 11 Features: Integration of new Java 11 features like HTTP Client and string methods.

Course Outline: Spring Boot


Banking Application Case
Day/Time Topic Details Hands-on/Deliverables
Study

Day 1 (4 Hours)

- Introduction to Spring - Refactor Bank, Customer,


Spring Core - Framework and Account classes into - Set up a Spring project and define beans
1st Hour - Spring IoC Container using XML/Java-based configuration.
Introduction Spring beans managed
- Dependency Injection (DI) - Use DI to inject dependencies into services.
by Spring IoC Container.
- Spring Beans
- Component -
Scanning and Bean Definition Use @Component and @A - Convert manual bean definitions into
Spring
2nd Hour - @Component, @Autowired utowired annotations for annotation-based components.
Configuration
- Configuring beans with Java dependency injection in - Use DI to inject services into BankService.
annotations banking services.
- Introduction to Spring Boot
- Spring Boot Starter Project - Create a Spring Boot - Set up a Spring Boot project.
Spring Boot
3rd Hour - Spring Boot Annotations application for the banking - Configure banking services as a Spring Boot
Introduction
- Properties and system. application, with dependencies in [Link].
Configuration
- Spring Boot Layers: - Design
Spring Boot Controller, Service, the CustomerController, Ac - Build a layered architecture for the banking
4th Hour Application Repository countService, system with segregation of controller,
Layering - Understanding Controller, and AccountRepository in a service, and repository layers.
Service, Repository pattern layered architecture.
Day 2 (4 Hours)

- Introduction to JPA and - - Set up Spring Data JPA.


Spring Data JPA - ORM Map Customer and Accoun - Map Customer and Account as JPA entities.
1st Hour - Spring Data JPA tto relational database -
Basics
- Entity Mapping tables using JPA Define CustomerRepository and AccountRepo
- JpaRepository Interface annotations. sitory.
- Implementing CRUD
operations using Spring Data - Create services to - Implement CRUD operations
Spring Data JPA - JPA perform CRUD operations
2nd Hour for Customer and Account using Spring Data
CRUD - Repository on customer and account
JPA’s repository interface.
Methods: save(), findById(), data using Spring Data JPA.
delete()
- Writing Custom - Implement custom
Custom Queries in Queries using JPA (e.g., find queries to fetch customers - Write custom queries for complex searches
3rd Hour by name, find by account (e.g., customers with balances over a
Spring Data JPA by balance range,
balance) threshold, or accounts with specific criteria).
transaction history, etc.
- JPQL and Native Queries
Banking App with - Integrating Spring Data JPA - Enable persistence of - Finalize CRUD operations with JPA for
4th Hour
Data JPA with the existing banking customer and account data account management.
Banking Application Case
Day/Time Topic Details Hands-on/Deliverables
Study

application using Spring Data JPA. - Store transactions and retrieve the
- Database operations for transaction history for accounts.
accounts and transactions
Day 3 (4 Hours)

- Introduction to REST - Create REST endpoints


- Spring Boot REST Controller - Build RESTful APIs for managing customers,
for customer and account
- accounts, and transactions.
1st Hour Building REST APIs management (e.g., GET
@RestController and @Req - Implement GET, POST, PUT, DELETE
/customers, POST
uestMapping operations.
/accounts).
- JSON Response
- Request - Validate customer
REST API Data Validation: @Valid, @Reques account requests (e.g., - Implement request validationusing Spring
2nd Hour tBody, @PathVariable invalid account number, Boot (e.g., validating account creation or
Validation
- Error handling in negative balance) using withdrawal with custom messages).
REST: @ExceptionHandler Spring validation.
-
- Implement pagination
RESTful API Implement Pagination and S - Use pagination and sorting to handle large
and sorting for large
3rd Hour Pagination and ortingusing Spring Data JPA datasets (e.g., GET
customer lists and
Sorting and REST /customers?page=1&size=10).
transaction history.
- Pageable, Sort
- Aspect-Oriented
Programming Basics - Identify cross-cutting - Create a logging aspect that logs every
Introduction to - Cross-cutting Concerns concerns in the banking
4th Hour request and transaction performed in the
AOP - app (e.g., logging, security
banking system.
@Aspect, @Before, @After, checks).
@Around
Day 4 (4 Hours)

- Create an AOP logging


- Implementing Logging using module that logs customer - Implement a logging aspect using AOP that
1st Hour AOP for Logging AOP and account transactions logs all major activities (e.g., deposits,
- Before and AfterAdvice before and after they are withdrawals) within the system.
performed.
-
Implementing Auditing using - Use AOP to implement an - Create auditing advice that tracks who
AOP for Auditing AOP performed transactions and when.
2nd Hour auditing module that
and Security - Around Advice for - Secure sensitive operations (e.g., large
tracks all transactions.
Transaction Auditing withdrawals) with AOP.
- AOP for Security Checks
- Review and finalize the full - Complete the banking application with all
Final
banking system with Spring - Finalize the banking aspects: customer management, account
3rd Hour Implementation &
Boot, Data JPA, REST, and system with all features. operations, multithreading, persistence, and
Review
AOP. logging.
- Address any remaining
questions
- Discuss the complete
- Review key concepts and
implementation and - Conduct a final review and Q&A session to
4th Hour Wrap-up and Q&A implementation details
address any questions or clarify any doubts and discuss enhancements.
- Discuss potential
issues.
improvements and next
steps
Details of the Banking Application Case Study:

Entities:

 Customer: A person who holds one or more accounts.


 Account: Represents the customer’s bank account (either savings or current).
 Bank: Manages customer accounts and handles transactions.

Features:

 Persistence with Spring Data JPA: Persist customer, account, and transaction data.
 RESTful APIs: Developed for customer and account management.
 Validation: Ensures correct input data and handles errors gracefully.
 AOP: Manages cross-cutting concerns such as logging and auditing.

Expected Outcomes:

By the end of this plan, you will have built a fully functional banking application with the following components:

 Spring Core: Managed dependency injection and bean management.


 Spring Boot: Bootstrapped the application using Spring Boot.
 Spring Data JPA: Implemented persistence for customer and account management.
 REST APIs: Created APIs for managing customers, accounts, and transactions.
 AOP: Handled cross-cutting concerns like logging and auditing using AOP.

Additional Topics
1. Introduction to Java 21 Features
 Overview of Java 21
 Sealed Classes
 Concept and use cases
 Sealed classes and interfaces in hierarchies
 Benefits in controlling inheritance
 Virtual Threads
 Introduction to Project Loom and Virtual Threads
 Comparing Virtual Threads vs. Platform Threads
 How Virtual Threads improve concurrency
 Practical example using Virtual Threads
 Other Key Features (Optional)
 Record patterns, pattern matching enhancements, etc.

2. Lambda Expressions and Streams in Java


 Lambda Expressions
 Syntax and usage
 Functional interfaces
 Real-world use cases
 Streams API
 Introduction to Streams
 Stream operations (filter, map, reduce)
 Parallel streams and performance considerations
 Stream pipeline creation and best practices

3. Types of Constructors in Java


 Default Constructor
 Automatically provided by the compiler
 Importance in object creation
 Parameterized Constructor
 Use in initializing objects with specific values

 Creating copies of objects
 Importance of Constructors in Java
 Constructor overloading and use cases
 Best practices in constructor usage

4. Introduction to Spring Actuator


 What is Spring Actuator?
 Key Features and Benefits
 Endpoints
 Health, Info, Metrics, and more
 Securing Actuator Endpoints
 Custom Actuator Endpoints (for custom application metrics)
 Integration with monitoring systems (e.g., Prometheus, Grafana)

5. Introduction to Spring Batch


 What is Spring Batch?
 Importance of batch processing in enterprise applications
 Core Concepts
 Job, Step, Reader, Processor, Writer
 Use Cases for Spring Batch
 ETL (Extract, Transform, Load) processes
 Large-scale data processing
 Example Use Case
 Batch job that reads from a database, processes data, and writes it to a file

6. Design Patterns in Spring Boot


 Singleton Pattern
 Use case in Spring Beans
 How Spring manages singleton beans
 Autowired Singletons
 Dependency Injection in Spring using @Autowired
 Managing dependencies between singleton and prototype beans
 Aspect-Oriented Programming (AOP) and Monkey Patching
 Introduction to AOP in Spring
 Use cases for AOP: logging, security, transaction management
 How AOP can be seen as "Monkey Patching" in Spring Boot
 Factory Pattern
 Role of Factory Pattern in object creation
 Example of Factory Pattern implementation in Spring

You might also like