0
# Spring Boot Dependencies BOM
1
2
Spring Boot Dependencies BOM provides centralized dependency management for the Spring Boot ecosystem. It defines versions, exclusions, and metadata for over 200 third-party libraries, ensuring compatibility and reducing dependency conflicts in Spring Boot applications.
3
4
## Package Information
5
6
- **Package Name**: spring-boot-dependencies
7
- **Package Type**: maven
8
- **Language**: Gradle (DSL for dependency management)
9
- **Installation**: Import as BOM platform dependency
10
- **Maven**: `<dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>3.5.3</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>`
11
- **Gradle**: `dependencies { implementation platform('org.springframework.boot:spring-boot-dependencies:3.5.3') }`
12
13
## Core Usage Patterns
14
15
### Gradle Platform Import
16
17
```gradle
18
dependencies {
19
// Import the BOM to manage versions
20
implementation platform('org.springframework.boot:spring-boot-dependencies:3.5.3')
21
22
// Use managed dependencies without explicit versions
23
implementation 'org.springframework.boot:spring-boot-starter-web'
24
implementation 'org.springframework:spring-webmvc'
25
implementation 'com.fasterxml.jackson.core:jackson-core'
26
}
27
```
28
29
### Maven BOM Import
30
31
```xml
32
<dependencyManagement>
33
<dependencies>
34
<dependency>
35
<groupId>org.springframework.boot</groupId>
36
<artifactId>spring-boot-dependencies</artifactId>
37
<version>3.5.3</version>
38
<type>pom</type>
39
<scope>import</scope>
40
</dependency>
41
</dependencies>
42
</dependencyManagement>
43
```
44
45
## Basic Usage
46
47
```gradle
48
plugins {
49
id 'java'
50
id 'org.springframework.boot' version '3.5.3'
51
}
52
53
dependencies {
54
// BOM automatically imported by Spring Boot plugin
55
implementation 'org.springframework.boot:spring-boot-starter-web'
56
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
57
implementation 'org.postgresql:postgresql'
58
59
testImplementation 'org.springframework.boot:spring-boot-starter-test'
60
testImplementation 'org.testcontainers:junit-jupiter'
61
}
62
```
63
64
## Architecture
65
66
The BOM operates as a hierarchical dependency management system:
67
68
- **Library Definitions**: Each library contains group IDs, artifact IDs, versions, and constraints
69
- **BOM Chain**: References other BOMs (Spring Framework, Jackson, Reactor) for transitive management
70
- **Version Alignment**: Ensures compatible versions across library boundaries using `alignWith` directives
71
- **Prohibition Rules**: Prevents incompatible versions using `prohibit` constraints
72
- **Rich Metadata**: Links to documentation, javadocs, and release notes for each library
73
- **Exclusion Management**: Handles transitive dependency conflicts through targeted exclusions
74
75
This design provides centralized version management while maintaining flexibility for Spring Boot's opinionated approach to dependency resolution.
76
77
## Capabilities
78
79
### Core Spring Boot Components
80
81
Essential Spring Boot modules and starters that form the foundation of Spring Boot applications.
82
83
```gradle { .api }
84
// Spring Boot core libraries
85
'org.springframework.boot:spring-boot'
86
'org.springframework.boot:spring-boot-autoconfigure'
87
'org.springframework.boot:spring-boot-starter'
88
89
// Web and reactive starters
90
'org.springframework.boot:spring-boot-starter-web'
91
'org.springframework.boot:spring-boot-starter-webflux'
92
'org.springframework.boot:spring-boot-starter-jersey'
93
94
// Data access starters
95
'org.springframework.boot:spring-boot-starter-data-jpa'
96
'org.springframework.boot:spring-boot-starter-data-r2dbc'
97
'org.springframework.boot:spring-boot-starter-data-mongodb'
98
```
99
100
[Spring Boot Components](./spring-boot-components.md)
101
102
### Data Access Libraries
103
104
Database drivers, connection pools, and data access frameworks with version alignment and exclusion management.
105
106
```gradle { .api }
107
// JDBC drivers
108
'org.postgresql:postgresql' // 42.7.7
109
'com.mysql:mysql-connector-j' // 9.2.0
110
'com.microsoft.sqlserver:mssql-jdbc' // 12.10.0.jre11
111
'com.oracle.database.jdbc:ojdbc11' // 23.7.0.25.01
112
113
// Connection pooling
114
'com.zaxxer:HikariCP' // 6.3.0
115
116
// Database migration
117
'org.flywaydb:flyway-core' // 11.7.2
118
'org.liquibase:liquibase-core' // 4.31.1
119
```
120
121
[Data Access](./data-access.md)
122
123
### Web and HTTP Libraries
124
125
Web servers, HTTP clients, and web framework components with embedded server support.
126
127
```gradle { .api }
128
// Embedded servers
129
'org.apache.tomcat.embed:tomcat-embed-core' // 10.1.42
130
'org.eclipse.jetty:jetty-server' // 12.0.22
131
'io.undertow:undertow-core' // 2.3.18.Final
132
133
// HTTP clients
134
'org.apache.httpcomponents.client5:httpclient5' // 5.5
135
'org.apache.httpcomponents.core5:httpcore5' // 5.3.4
136
137
// Web frameworks
138
'org.glassfish.jersey.core:jersey-server' // 3.1.10
139
```
140
141
[Web and HTTP](./web-http.md)
142
143
### Spring Framework Integration
144
145
Spring Framework BOM and related Spring project BOMs with version alignment.
146
147
```gradle { .api }
148
// Spring Framework (aligned via BOM)
149
'org.springframework:spring-context'
150
'org.springframework:spring-web'
151
'org.springframework:spring-webmvc'
152
153
// Spring Data (aligned via spring-data-bom)
154
'org.springframework.data:spring-data-jpa'
155
'org.springframework.data:spring-data-mongodb'
156
157
// Spring Security (aligned via spring-security-bom)
158
'org.springframework.security:spring-security-web'
159
'org.springframework.security:spring-security-config'
160
```
161
162
[Spring Integration](./spring-integration.md)
163
164
### Testing Libraries
165
166
Testing frameworks, mocking libraries, and test containers with Spring Boot test integration.
167
168
```gradle { .api }
169
// JUnit and testing
170
'org.junit.jupiter:junit-jupiter' // 5.11.3
171
'org.mockito:mockito-core' // 5.15.0
172
'org.assertj:assertj-core' // 3.26.3
173
174
// Spring Boot testing
175
'org.springframework.boot:spring-boot-starter-test'
176
'org.springframework.boot:spring-boot-test-autoconfigure'
177
178
// Integration testing
179
'org.testcontainers:junit-jupiter' // 1.21.2
180
'org.testcontainers:postgresql' // 1.21.2
181
```
182
183
[Testing](./testing.md)
184
185
### Observability and Monitoring
186
187
Metrics, tracing, and monitoring libraries with Micrometer integration.
188
189
```gradle { .api }
190
// Micrometer metrics
191
'io.micrometer:micrometer-core' // 1.15.1
192
'io.micrometer:micrometer-registry-prometheus' // 1.15.1
193
194
// Distributed tracing
195
'io.micrometer:micrometer-tracing-bridge-brave' // 1.5.1
196
'io.zipkin.brave:brave' // 6.1.0
197
198
// OpenTelemetry
199
'io.opentelemetry:opentelemetry-api' // 1.49.0
200
```
201
202
[Observability](./observability.md)
203
204
## Version Management Features
205
206
### Automatic Version Resolution
207
208
```gradle
209
dependencies {
210
implementation platform('org.springframework.boot:spring-boot-dependencies:3.5.3')
211
212
// These get versions from BOM automatically
213
implementation 'org.springframework.boot:spring-boot-starter-web'
214
implementation 'com.fasterxml.jackson.core:jackson-core'
215
implementation 'org.hibernate.orm:hibernate-core'
216
}
217
```
218
219
### Version Alignment Across BOMs
220
221
```gradle
222
dependencies {
223
implementation platform('org.springframework.boot:spring-boot-dependencies:3.5.3')
224
225
// Elasticsearch client version aligned with Spring Data Elasticsearch
226
implementation 'org.elasticsearch.client:elasticsearch-rest-client'
227
implementation 'org.springframework.data:spring-data-elasticsearch'
228
229
// MongoDB driver aligned with Spring Data MongoDB
230
implementation 'org.mongodb:mongodb-driver-sync'
231
implementation 'org.springframework.data:spring-data-mongodb'
232
}
233
```
234
235
### Override Management
236
237
```gradle
238
dependencies {
239
implementation platform('org.springframework.boot:spring-boot-dependencies:3.5.3')
240
241
// Override BOM version when needed
242
implementation 'org.apache.commons:commons-lang3:3.14.0'
243
244
// Use BOM-managed version
245
implementation 'org.apache.commons:commons-dbcp2'
246
}
247
```