Spring Framework guide
Learn how Spring creates objects, connects dependencies, accesses data, and handles web requests. Read the complete chapter text and code from Spring Framework Notes for Professionals, with corrections and version notes alongside the original material.
Explore all chapters
- Getting Started
Set up an XML or Java application context, declare beans, inject dependencies, and understand lifecycle callbacks.
- Core and Dependency Management
Understand dependencies, loose coupling, interfaces, and the role of the Spring IoC container.
- Expression Language (SpEL)
Read expression syntax for literals, collections, maps, and method calls in Spring configuration.
- SimpleJdbcCall and SqlRowSet
Call stored procedures with cursor outputs and understand the Oracle-specific row-set examples.
- Creating and Wiring Beans
Explore component scanning, qualifiers, generic injection, FactoryBean, and prototype dependencies.
- Bean Scopes
Compare singleton, prototype, request, session, application, and WebSocket bean lifetimes.
- Conditional Bean Registration
Register beans conditionally using properties, classes, resources, and application context information.
- Bean Validation
Validate nested objects, customize validation messages, and understand class-level constraints.
- ApplicationContext Configuration
Bootstrap an application context and compare annotation-based, Java, and XML bean definitions.
- RestTemplate HTTP Requests
Study legacy HTTP requests, streaming downloads, headers, generic response types, and authentication.
- Task Execution and Scheduling
Enable scheduling and compare cron expressions, time zones, fixed delays, and fixed rates.
- Lazy Initialization
Delay bean creation with XML or annotations and understand eager dependency resolution.
- Property Sources
Load properties from configuration files and inject values into Spring-managed beans.
- Dependency Injection and IoC
Compare constructor, setter, field, optional, Java-configured, and XML-configured injection.
- JdbcTemplate Queries and Batches
Use scalar queries, row mapping, row sets, batch operations, and named SQL parameters.
- SOAP Web Service Consumption
Understand SOAP client transport configuration and the source book’s Basic authentication example.
- Profiles and Environments
Select environment-specific configuration and activate profiles in applications and tests.
- DispatcherServlet and Spring MVC
Understand the MVC front controller, servlet mappings, controller scanning, and JSP view resolution.
Common questions
What does this Spring Framework guide cover?
All 18 chapters and 54 numbered sections from the source book: setup, Spring Core, SpEL, stored procedures, beans, scopes, conditions, validation, application contexts, HTTP clients, scheduling, lazy initialization, properties, dependency injection, JDBC, SOAP, profiles, and Spring MVC.
Are the examples compatible with current Spring versions?
The source book documents older Spring versions. Each chapter separates original examples from editorial corrections and version notes. Check the linked official documentation before using a recipe in a current application.
Is Spring Framework the same as Spring Boot?
Spring Framework supplies the core container, dependency injection, web, and data-access infrastructure. Spring Boot builds on it with auto-configuration and application setup conventions. The guide identifies Boot-specific annotations where the source mixes the two.
Contributors and credits
- AdamIJKChapters 12
- ArloChapters 4
- bernieChapters 10
- BondChapters 7
- CollinDChapters 5
- ConstantineChapters 5, 6
- DavidRChapters 12
- dimitrisliChapters 1
- eltaboChapters 10
- Gautam JoseChapters 13
- guille11Chapters 11, 16
- Harshal PatilChapters 5
- Hitesh KumarChapters 1
- ipsiChapters 1
- JamesENLChapters 5
- JohirChapters 11
- manishChapters 14
- Moshe AradChapters 12
- mszymborskiChapters 5
- nicholas.hauschildChapters 9
- PantherChapters 1, 6, 13
- Praneeth RameshChapters 8
- Rajanikanta PradhanChapters 1, 2
- Sergii BishyrChapters 14
- SetuChapters 15
- smichelChapters 15
- Srinivas GadilliChapters 18
- StanislavLChapters 5, 7, 8, 10, 15, 17
- Stefan IseleChapters 5
- TaylorChapters 6
- Tim TongChapters 5, 6
- walshChapters 3
- xpadroChapters 6
- Xtreme BikerChapters 11