Spring Framework

Definition

The Spring Framework is an open-source application framework for the Java ecosystem that provides infrastructure support for developing Java applications. It is the foundation of the broader Spring ecosystem, including Spring Boot and Spring Cloud.

Overview

Created by Rod Johnson in 2002 and first released in 2004, Spring was designed to address the complexity of enterprise Java development. It introduced dependency injection and aspect-oriented programming to mainstream Java development. Spring Boot (2014) simplified Spring’s configuration, making it the dominant Java framework for enterprise development.

Key Components

  • Spring Core: Core container with dependency injection (IoC) and inversion of control
  • Spring MVC: Model-View-Controller web framework
  • Spring Data: Data access framework with unified API for multiple stores
  • Spring Security: Authentication and authorization framework
  • Spring AOP: Aspect-oriented programming for cross-cutting concerns
  • Spring ORM: Object-relational mapping integration (Hibernate, JPA)
  • Spring Batch: Batch processing framework
  • Spring Cloud: Distributed system tools (service discovery, config server, circuit breakers)

Architecture

  • Dependency Injection: Inversion of Control (IoC) container manages object lifecycles
  • Aspect-Oriented Programming: Separation of cross-cutting concerns (logging, transactions)
  • Convention over configuration: Spring Boot auto-configuration reduces boilerplate
  • Modular design: Use only the modules you need

Spring Ecosystem

Project Purpose
Spring Framework Core IoC, AOP, MVC, Data, Security
Spring Boot Opinionated auto-configuration for rapid development
Spring Cloud Distributed/microservices patterns (service discovery, config, gateway)
Spring Data Unified data access across relational, NoSQL, and cloud stores
Spring Security Authentication, authorization, and protection against attacks
Spring Batch Enterprise batch processing
Spring Integration Enterprise integration patterns

Major Versions

Version Year Key Features
Spring 1.0 2004 Core IoC container, AOP
Spring 2.0 2006 Annotations, AOP, Spring MVC
Spring 3.0 2009 Java 5+, JavaConfig, REST, EL
Spring 4.0 2013 Java 8 support, Groovy DSL, WebSocket
Spring 5.0 2017 Reactive stack (WebFlux), Kotlin support, Java 8+
Spring 6.0 2022 Jakarta EE, Java 17+, records, sealed classes

Spring Boot

Spring Boot is not a separate framework but an opinionated convention-over-configuration layer on top of Spring:

  • Auto-configuration of Spring and third-party libraries
  • Embedded web servers (Tomcat, Jetty, Undertow)
  • Production-ready features (metrics, health checks, externalized config)
  • Starter dependencies for common use cases
  • No code generation, no XML configuration required

Licensing

The Spring Framework is released under the Apache License 2.0, an OSI-approved permissive open-source license. It is free to use, modify, and distribute for any purpose, including commercial use.

See spring-projects/spring-framework for details.

Use Cases

  • Enterprise web applications
  • RESTful APIs and microservices
  • Cloud-native applications
  • Batch processing systems
  • Real-time reactive applications (WebFlux)
  • Financial services and banking systems