Spring Framework Bill of Materials (BOM) that provides centralized dependency management for all Spring Framework modules and third-party dependencies
npx @tessl/cli install tessl/maven-org-springframework--spring-framework-bom@6.2.00
# Spring Framework BOM
1
2
## Overview
3
4
The Spring Framework Bill of Materials (BOM) provides centralized dependency management for all Spring Framework modules and their third-party dependencies. It serves as a platform BOM that allows developers to import consistent versions of Spring Framework dependencies without specifying individual version numbers.
5
6
## Package Information
7
8
- **Package Name**: org.springframework:spring-framework-bom
9
- **Package Type**: Maven/Gradle Platform BOM
10
- **Language**: Java (build configuration)
11
- **Installation**: Import as a platform dependency in Maven or Gradle
12
13
## Core Imports
14
15
### Maven Import
16
17
```xml
18
<dependencyManagement>
19
<dependencies>
20
<dependency>
21
<groupId>org.springframework</groupId>
22
<artifactId>spring-framework-bom</artifactId>
23
<version>6.2.8</version>
24
<type>pom</type>
25
<scope>import</scope>
26
</dependency>
27
</dependencies>
28
</dependencyManagement>
29
```
30
31
### Gradle Import
32
33
```gradle
34
dependencies {
35
implementation platform('org.springframework:spring-framework-bom:6.2.8')
36
}
37
```
38
39
## Basic Usage
40
41
```gradle
42
dependencies {
43
// Import the BOM for dependency management
44
implementation platform('org.springframework:spring-framework-bom:6.2.8')
45
46
// Use Spring modules without version numbers
47
implementation 'org.springframework:spring-context'
48
implementation 'org.springframework:spring-web'
49
implementation 'org.springframework:spring-webmvc'
50
implementation 'org.springframework:spring-jdbc'
51
implementation 'org.springframework:spring-test'
52
}
53
```
54
55
```xml
56
<dependencies>
57
<!-- Import the BOM -->
58
<dependency>
59
<groupId>org.springframework</groupId>
60
<artifactId>spring-framework-bom</artifactId>
61
<version>6.2.8</version>
62
<type>pom</type>
63
<scope>import</scope>
64
</dependency>
65
66
<!-- Use Spring modules without version numbers -->
67
<dependency>
68
<groupId>org.springframework</groupId>
69
<artifactId>spring-context</artifactId>
70
</dependency>
71
<dependency>
72
<groupId>org.springframework</groupId>
73
<artifactId>spring-web</artifactId>
74
</dependency>
75
</dependencies>
76
```
77
78
## Architecture
79
80
The Spring Framework BOM operates as a Gradle/Maven platform dependency that:
81
82
- **Dependency Constraints**: Provides version constraints for all Spring Framework modules at version 6.2.8
83
- **Platform Imports**: Imports other platform BOMs for consistent third-party dependency management
84
- **Module Discovery**: Automatically includes all Spring Framework modules defined in the parent project
85
- **Version Alignment**: Ensures compatibility across the entire Spring ecosystem
86
87
## Capabilities
88
89
### Spring Framework Module Management
90
91
Provides dependency management for all Spring Framework modules, ensuring version consistency across the framework.
92
93
```gradle { .api }
94
// All Spring Framework modules managed at version 6.2.8
95
// Core Framework Modules:
96
'org.springframework:spring-aop:6.2.8'
97
'org.springframework:spring-aspects:6.2.8'
98
'org.springframework:spring-beans:6.2.8'
99
'org.springframework:spring-context:6.2.8'
100
'org.springframework:spring-context-indexer:6.2.8'
101
'org.springframework:spring-context-support:6.2.8'
102
'org.springframework:spring-core:6.2.8'
103
'org.springframework:spring-core-test:6.2.8'
104
'org.springframework:spring-expression:6.2.8'
105
'org.springframework:spring-instrument:6.2.8'
106
'org.springframework:spring-jcl:6.2.8'
107
108
// Data Access Modules:
109
'org.springframework:spring-jdbc:6.2.8'
110
'org.springframework:spring-orm:6.2.8'
111
'org.springframework:spring-oxm:6.2.8'
112
'org.springframework:spring-r2dbc:6.2.8'
113
'org.springframework:spring-tx:6.2.8'
114
115
// Web Framework Modules:
116
'org.springframework:spring-web:6.2.8'
117
'org.springframework:spring-webflux:6.2.8'
118
'org.springframework:spring-webmvc:6.2.8'
119
'org.springframework:spring-websocket:6.2.8'
120
121
// Messaging and Integration:
122
'org.springframework:spring-jms:6.2.8'
123
'org.springframework:spring-messaging:6.2.8'
124
125
// Testing:
126
'org.springframework:spring-test:6.2.8'
127
```
128
129
### Platform BOM Management
130
131
Imports and manages platform BOMs for consistent third-party dependency versioning.
132
133
```gradle { .api }
134
// Platform BOMs imported by the Spring Framework BOM:
135
platform('com.fasterxml.jackson:jackson-bom:2.18.4')
136
platform('io.micrometer:micrometer-bom:1.14.8')
137
platform('io.netty:netty-bom:4.1.121.Final')
138
platform('io.netty:netty5-bom:5.0.0.Alpha5')
139
platform('io.projectreactor:reactor-bom:2024.0.7')
140
platform('io.rsocket:rsocket-bom:1.1.5')
141
platform('org.apache.groovy:groovy-bom:4.0.27')
142
platform('org.apache.logging.log4j:log4j-bom:2.21.1')
143
platform('org.assertj:assertj-bom:3.27.3')
144
platform('org.eclipse.jetty:jetty-bom:12.0.21')
145
platform('org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.21')
146
platform('org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1')
147
platform('org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3')
148
platform('org.junit:junit-bom:5.13.1')
149
platform('org.mockito:mockito-bom:5.18.0')
150
```
151
152
### Third-Party Dependency Constraints
153
154
Provides version constraints for 120+ commonly used third-party libraries to ensure compatibility with Spring Framework.
155
156
```gradle { .api }
157
// Selected third-party library constraints:
158
159
// Jakarta EE APIs
160
'jakarta.servlet:jakarta.servlet-api:6.0.0'
161
'jakarta.annotation:jakarta.annotation-api:2.0.0'
162
'jakarta.inject:jakarta.inject-api:2.0.1'
163
'jakarta.persistence:jakarta.persistence-api:3.0.0'
164
'jakarta.transaction:jakarta.transaction-api:2.0.1'
165
'jakarta.validation:jakarta.validation-api:3.0.2'
166
'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'
167
168
// Database and Data Access
169
'com.h2database:h2:2.3.232'
170
'com.oracle.database.jdbc:ojdbc11:21.9.0.0'
171
'org.hsqldb:hsqldb:2.7.4'
172
'io.r2dbc:r2dbc-spi:1.0.0.RELEASE'
173
174
// Web and HTTP
175
'org.apache.httpcomponents.client5:httpclient5:5.5'
176
'com.squareup.okhttp3:okhttp:3.14.9'
177
'io.undertow:undertow-core:2.3.18.Final'
178
179
// Application Servers
180
'org.apache.tomcat.embed:tomcat-embed-core:10.1.28'
181
'org.eclipse.jetty:jetty-reactive-httpclient:4.0.9'
182
183
// Aspect-Oriented Programming
184
'org.aspectj:aspectjrt:1.9.22.1'
185
'org.aspectj:aspectjweaver:1.9.22.1'
186
187
// Template Engines
188
'org.freemarker:freemarker:2.3.34'
189
190
// Testing Frameworks
191
'junit:junit:4.13.2'
192
'org.hamcrest:hamcrest:2.2'
193
'org.mockito:mockito-core:5.18.0'
194
195
// And many more...
196
```
197
198
## Module Descriptions
199
200
### Core Framework Modules
201
202
- **spring-aop**: Aspect-Oriented Programming support, enabling cross-cutting concerns
203
- **spring-aspects**: AspectJ integration for compile-time weaving
204
- **spring-beans**: Core IoC container and dependency injection functionality
205
- **spring-context**: Application context, configuration, and resource management
206
- **spring-context-indexer**: Compile-time indexing for faster application startup
207
- **spring-context-support**: Extended context support including caching, scheduling, and mail
208
- **spring-core**: Fundamental utilities and core abstractions
209
- **spring-core-test**: Core testing utilities for Spring applications
210
- **spring-expression**: Spring Expression Language (SpEL) support
211
- **spring-instrument**: Instrumentation support for load-time weaving
212
- **spring-jcl**: Jakarta Commons Logging integration
213
214
### Data Access Modules
215
216
- **spring-jdbc**: JDBC data access abstraction and utilities
217
- **spring-orm**: Object-Relational Mapping integration (JPA, Hibernate, etc.)
218
- **spring-oxm**: Object-XML Mapping support for marshalling/unmarshalling
219
- **spring-r2dbc**: Reactive Relational Database Connectivity support
220
- **spring-tx**: Comprehensive transaction management
221
222
### Web Framework Modules
223
224
- **spring-web**: Core web support including HTTP clients and servlet utilities
225
- **spring-webflux**: Reactive web framework built on Project Reactor
226
- **spring-webmvc**: Traditional Model-View-Controller web framework
227
- **spring-websocket**: WebSocket protocol support for real-time communication
228
229
### Messaging and Integration
230
231
- **spring-jms**: Java Message Service integration for messaging
232
- **spring-messaging**: Messaging abstraction for various messaging systems
233
234
### Testing
235
236
- **spring-test**: Comprehensive testing framework with Spring TestContext
237
238
## Usage Examples
239
240
### Basic Spring Application
241
242
```xml
243
<?xml version="1.0" encoding="UTF-8"?>
244
<project xmlns="http://maven.apache.org/POM/4.0.0">
245
<modelVersion>4.0.0</modelVersion>
246
247
<groupId>com.example</groupId>
248
<artifactId>spring-app</artifactId>
249
<version>1.0.0</version>
250
251
<properties>
252
<maven.compiler.source>17</maven.compiler.source>
253
<maven.compiler.target>17</maven.compiler.target>
254
</properties>
255
256
<dependencyManagement>
257
<dependencies>
258
<dependency>
259
<groupId>org.springframework</groupId>
260
<artifactId>spring-framework-bom</artifactId>
261
<version>6.2.8</version>
262
<type>pom</type>
263
<scope>import</scope>
264
</dependency>
265
</dependencies>
266
</dependencyManagement>
267
268
<dependencies>
269
<dependency>
270
<groupId>org.springframework</groupId>
271
<artifactId>spring-context</artifactId>
272
</dependency>
273
<dependency>
274
<groupId>org.springframework</groupId>
275
<artifactId>spring-web</artifactId>
276
</dependency>
277
<dependency>
278
<groupId>com.fasterxml.jackson.core</groupId>
279
<artifactId>jackson-databind</artifactId>
280
</dependency>
281
</dependencies>
282
</project>
283
```
284
285
### Gradle Multi-Module Project
286
287
```gradle
288
// Root build.gradle
289
plugins {
290
id 'java-platform'
291
}
292
293
dependencies {
294
api platform('org.springframework:spring-framework-bom:6.2.8')
295
}
296
297
// Module build.gradle
298
dependencies {
299
implementation platform(project(':platform'))
300
301
implementation 'org.springframework:spring-context'
302
implementation 'org.springframework:spring-webmvc'
303
implementation 'org.springframework:spring-jdbc'
304
305
testImplementation 'org.springframework:spring-test'
306
testImplementation 'org.junit.jupiter:junit-jupiter'
307
}
308
```
309
310
### Spring Boot Integration
311
312
Spring Boot automatically manages Spring Framework versions, but you can override with the BOM:
313
314
```gradle
315
dependencies {
316
implementation platform('org.springframework:spring-framework-bom:6.2.8')
317
implementation 'org.springframework.boot:spring-boot-starter-web'
318
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
319
}
320
```
321
322
### Java Application Runtime Examples
323
324
The BOM ensures consistent versioning across all Spring dependencies at runtime:
325
326
```java
327
// All these imports use the same Spring Framework version (6.2.8)
328
// managed by the BOM
329
import org.springframework.context.ApplicationContext;
330
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
331
import org.springframework.beans.factory.annotation.Autowired;
332
import org.springframework.web.bind.annotation.RestController;
333
import org.springframework.web.bind.annotation.GetMapping;
334
import org.springframework.jdbc.core.JdbcTemplate;
335
import org.springframework.transaction.annotation.Transactional;
336
337
@RestController
338
public class ExampleController {
339
340
@Autowired
341
private JdbcTemplate jdbcTemplate; // spring-jdbc:6.2.8
342
343
@GetMapping("/data")
344
@Transactional // spring-tx:6.2.8
345
public String getData() {
346
// spring-web:6.2.8 and spring-context:6.2.8 working together
347
return jdbcTemplate.queryForObject("SELECT 'Hello World'", String.class);
348
}
349
}
350
```
351
352
The BOM also manages third-party dependencies that Spring Framework depends on:
353
354
```java
355
// Jackson dependency version managed by BOM
356
import com.fasterxml.jackson.databind.ObjectMapper; // 2.18.4
357
import com.fasterxml.jackson.core.JsonProcessingException;
358
359
// AspectJ version managed by BOM
360
import org.aspectj.lang.annotation.Aspect; // 1.9.22.1
361
import org.aspectj.lang.annotation.Around;
362
363
// Jakarta EE APIs version managed by BOM
364
import jakarta.servlet.http.HttpServletRequest; // 6.0.0
365
import jakarta.persistence.Entity; // 3.0.0
366
```
367
368
## Version Compatibility
369
370
The Spring Framework BOM 6.2.8 provides compatibility constraints for:
371
372
- **Java**: Requires Java 17 or higher
373
- **Jakarta EE**: Uses Jakarta EE 9+ specifications (jakarta.* namespace)
374
- **Kotlin**: Compatible with Kotlin 1.9.25
375
- **Build Tools**: Maven 3.6.3+, Gradle 7.5+
376
377
## Types
378
379
```gradle { .api }
380
// Platform dependency import format for Maven
381
dependency {
382
groupId: "org.springframework"
383
artifactId: "spring-framework-bom"
384
version: "6.2.8"
385
type: "pom"
386
scope: "import"
387
}
388
389
// Platform dependency import format for Gradle
390
platform('org.springframework:spring-framework-bom:6.2.8')
391
```