Spring Framework is an open-source application framework and inversion of control (IoC) container for the Java platform. Its core features can be used by any Java application, and the framework provides extensions for building web applications on top of the Jakarta EE platform. It does not impose a single programming model, and it has become widely used in the Java community as an alternative or complement to the Enterprise JavaBeans (EJB) model. The framework is distributed as free and open-source software under the Apache License 2.0.
Origins and history
The first version was written by Rod Johnson and was released in connection with his book Expert One-on-One J2EE Design and Development, published in October 2002. The framework was first released under the Apache 2.0 license in June 2003, and the first production release, version 1.0, followed in March 2004. The project has since passed through major generations: 2.0 (2006), 2.5 (2007), 3.0 (2009), 3.1 (2011), 3.2 (2013), 4.0 (December 2013), 4.2 (2015), 4.3 (2016), 5.0 (2017), 6.0 (November 2022), 6.1 (2023), 6.2 (2024), and 7.0 (November 2025) according to project announcements. Version 1.2.6 received a Jolt productivity award and a JAX Innovation Award in 2006.
Version 6.0 introduced a Java 17+ baseline and a migration to the Jakarta EE 9+ jakarta namespace, alongside support for more recent Jakarta EE APIs such as Servlet 6.0 and Jakarta Persistence 3.1. Version 5.0 was built on a Reactive Streams-compatible Reactor Core foundation. The project is maintained by a core team of developers, with corporate sponsorship historically associated with SpringSource, later Pivotal, and subsequently VMware (part of Broadcom). The source code is hosted on GitHub under the spring-projects organization.
Core container and dependency injection
The IoC container is the foundational element of the framework. It provides a consistent means of configuring and managing Java objects, largely through dependency injection, using reflection and configuration metadata. Objects created and managed by the container are referred to as beans. The container manages object lifecycles: instantiating objects, invoking initialization methods, and wiring objects together. Two principal container interfaces are commonly cited: BeanFactory and ApplicationContext.
Configuration may be expressed through XML files, Java annotations on configuration classes (for example @Configuration and @Bean), or programmatic approaches. Dependency injection may be constructor-based, setter-based, or field-based. The framework also provides autowiring, with annotations such as @Autowired, @Qualifier, and @Primary, as well as support for the standard annotations @Resource and @Inject.
Modules and capabilities
The framework is organized into a set of modules distributed as JAR artifacts, obtainable through repositories such as Maven Central using build tools like Maven or Gradle. Commonly described modules and areas of functionality include:
- Core container (
spring-core): the IoC container and shared utility classes. - Aspect-oriented programming (
spring-aop): support for modularizing cross-cutting concerns. Spring AOP is proxy-based and configured at runtime, which avoids a compilation or load-time weaving step but is less powerful than the AspectJ framework. Spring also integrates with AspectJ, including a pointcut language and an aspects library. - Data access (
spring-jdbc,spring-orm,spring-oxm, and others): abstractions over JDBC, object-relational mapping technologies such as Hibernate and the Jakarta Persistence API (JPA), and object-to-XML mapping. Features include resource management, exception translation, transaction participation, and blob/clob handling. - Transaction management: an abstraction supporting local and global transactions, nested transactions, and savepoints, with declarative configuration (for example the
@Transactionalannotation) or programmatic use viaTransactionTemplate. It is intended to work without requiring a full application server or JTA in many scenarios. - Model–view–controller (Spring MVC): a request-based web application framework built on the Servlet API, with
DispatcherServletacting as a front controller. Strategy interfaces includeController,HandlerMapping,HandlerAdapter,HandlerInterceptor,View,ViewResolver,LocaleResolver, andMultipartResolver. Spring Boot can bootstrap the servlet automatically. - Reactive web support (Spring WebFlux): support for reactive programming with runtimes and servers such as Netty and Undertow, including support for Server-Sent Events and WebSocket communication (
spring-websocket). - Messaging and integration: declarative message listener registration via the Java Message Service (JMS), and dedicated projects such as Spring Integration for enterprise application integration and event-driven architectures, and Spring Batch for batch processing.
- Remote access: abstractions over RPC-style technologies including RMI, RMI-IIOP/CORBA, Hessian, Burlap, and SOAP-based web services, together with EJB client integration.
- Testing: support classes for unit and integration testing of Spring-based applications.
- Security: authentication and authorization capabilities provided through the separate Spring Security project (formerly the Acegi Security System for Spring).
Ecosystem and related projects
The Spring Framework serves as the foundation for a broader family of Spring projects, often referred to collectively as "Spring." Notable examples include Spring Boot, a convention-over-configuration solution for creating stand-alone, production-grade Spring applications that can be run directly and require minimal explicit configuration; Spring Data; Spring Security; Spring Roo, a code-generation-based rapid application development tool; Spring Batch; Spring Integration; and Spring Web Flow.
Security
In April 2022, a remote code execution vulnerability affecting certain versions of the Spring Framework was published as CVE-2022-22965 and commonly named Spring4Shell, a reference to the earlier Log4Shell vulnerability. The naming reflected similarities in proof-of-concept exploits that could grant shell access or broader control of affected systems.
Reception and criticism
The framework is widely adopted for enterprise Java development, and its abstractions are credited with easing configuration, testing, and integration. At the same time, some commentators have criticized perceived non-compliance with certain Java enterprise standards, and others have described specific data-access template classes as intrusive relative to using vendor APIs directly. In response, the project has made it possible to use APIs such as Hibernate and JPA directly, though that approach forgoes some of Spring's exception-translation and resource-management conveniences. Debates about the relative merits of Spring and EJB 3.0 have also been documented, with the Spring project maintaining that its container allows for more flexible programming models.