This Spring course teaches learners the core concepts of the Spring Framework. Learners gain a solid understanding of Dependency Injection, the Spring Container, and how to define and manage Spring Beans. The course also covers Spring application testing, Aspect-Oriented Programming (AOP), Spring's robust support for database integration, transaction management, and JPA. By the end of this training, learners confidently build well-structured, testable, and maintainable applications using the Spring Framework.
Skills Gained
What is the Spring Framework?
Spring Philosophies
Coding to Interfaces
Dependency Injection
Easy to Test
Why Spring?
Spring Container
Quick Spring Example - @Configuration
Quick Spring Example - ApplicationContext
Avoiding Dependency on Spring
Additional Spring Projects/Frameworks
What is Spring Boot?
Spring “Beans”
Spring ApplicationContext
Instantiating the Spring ApplicationContext
Retrieving Spring Beans
Configuration classes
@Bean methods
Overriding Bean Names
Uniqueness of Bean IDs / Names
Bean Scope
Effect of Bean Scope on Instances
Profiles
Profiles – Not.
Default Profile
Profile on @Configuration class
Eager vs Lazy
Lazy Bean Misuse
External Properties
@Value
@PropertySource
@PropertySource & @Profile
Defining Beans with Annotations
@Component Annotation
@ComponentScan Annotation
Bean ID/name and Type
Scope, Profile, and Lazy
Constructors
Constructor injection with @Autowired
Setter injection with @Autowired
Constructor vs. Setter Injection
Field injection with @Autowired
Setting properties with @Value
Resolving Duplicate Beans
Disambiguation with @Qualifier
@PostConstruct
@PreDestroy
Java @Configuration vs Annotation Configuration
Alternate Annotations, JSR 330 @Named
JSR 330 @Inject Annotation
JSR 250 @Resource Annotation
Spring Testing
Unit Testing vs Integration Testing
Setup
Implementing JUnit / Spring Integration Tests
Shortcut - @SpringJUnitConfig
Accessing Spring Components Within Test Classes
Defining Tests to Execute
Testing
@DirtiesContext
Default Configuration
@ActiveProfiles
@TestPropertySource
@Transactional Testing Support
@Sql Database Support
JUnit Annotations
Other useful JUnit Annotations
Mock Objects
Sample JUnit test with Mockito (no Spring)
Introduction to Aspect-Oriented Programming
What is AOP?
Cross-Cutting Concerns
Cross-Cutting Concern Example
AOP Terminology
AOP in Spring
Understanding Proxy Objects
CGLib Proxies
AOP Example
Enabling Spring AOP
Five Advice Types
Pointcut Syntax
Pointcut Examples
@Before Example
@AfterReturning Example
@Around Example
DAO Design Pattern
DAO Support in Spring
Spring Data Access Support
Spring JDBC Support
Defining DataSource Beans
Connection Pooling
Embedded Databases
Selecting a DataSource using @Profile
Spring ORM Support
DataAccessException
DataAccessExceptions
@Repository Annotation
Spring JDBC Support
Main Spring JDBC Classes
Spring JdbcClient
Using JdbcClient
JdbcClient, Named parameters
Retrieving domain objects
RowMapper
Retrieving multiple domain objects
Updates with JdbcClient
Inserts with JdbcClient
JdbcTemplate
JdbcTemplate - Updates
JdbcTemplate – Query with RowMapper
Transactions
Declarative Transaction Management in Spring
PlatformTransactionManager
Bean ID = transactionManager
Transaction Management Setup
What Will Spring Do?
Understanding Propagation
Transaction Behavior - Propagation
Transaction Behavior - Isolation
Read-Only and Timeouts
Setting attributes using @Transactional
Transaction Rollback
Limitations of Proxies
Proxy Work-Around - Self-Injection
Testing with @Transactional
Object to Relational Mapping Frameworks (ORM)
Java ORM frameworks
Using JPA in a Spring Application
JPA Metadata
EntityManagerFactoryBean
Understanding the EntityManager and Persistence Context
Primary EntityManager methods
Entity Lifecycle
Spring DAO based on JPA
Why @PersistenceContext, not @Autowired?