CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-springframework--spring-framework-bom

Spring Framework Bill of Materials (BOM) that provides centralized dependency management for all Spring Framework modules and third-party dependencies

Pending
Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

Spring Framework BOM

Overview

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.

Package Information

  • Package Name: org.springframework:spring-framework-bom
  • Package Type: Maven/Gradle Platform BOM
  • Language: Java (build configuration)
  • Installation: Import as a platform dependency in Maven or Gradle

Core Imports

Maven Import

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>6.2.8</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Gradle Import

dependencies {
    implementation platform('org.springframework:spring-framework-bom:6.2.8')
}

Basic Usage

dependencies {
    // Import the BOM for dependency management
    implementation platform('org.springframework:spring-framework-bom:6.2.8')
    
    // Use Spring modules without version numbers
    implementation 'org.springframework:spring-context'
    implementation 'org.springframework:spring-web'
    implementation 'org.springframework:spring-webmvc'
    implementation 'org.springframework:spring-jdbc'
    implementation 'org.springframework:spring-test'
}
<dependencies>
    <!-- Import the BOM -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>6.2.8</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
    
    <!-- Use Spring modules without version numbers -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </dependency>
</dependencies>

Architecture

The Spring Framework BOM operates as a Gradle/Maven platform dependency that:

  • Dependency Constraints: Provides version constraints for all Spring Framework modules at version 6.2.8
  • Platform Imports: Imports other platform BOMs for consistent third-party dependency management
  • Module Discovery: Automatically includes all Spring Framework modules defined in the parent project
  • Version Alignment: Ensures compatibility across the entire Spring ecosystem

Capabilities

Spring Framework Module Management

Provides dependency management for all Spring Framework modules, ensuring version consistency across the framework.

// All Spring Framework modules managed at version 6.2.8
// Core Framework Modules:
'org.springframework:spring-aop:6.2.8'
'org.springframework:spring-aspects:6.2.8'
'org.springframework:spring-beans:6.2.8'
'org.springframework:spring-context:6.2.8'
'org.springframework:spring-context-indexer:6.2.8'
'org.springframework:spring-context-support:6.2.8'
'org.springframework:spring-core:6.2.8'
'org.springframework:spring-core-test:6.2.8'
'org.springframework:spring-expression:6.2.8'
'org.springframework:spring-instrument:6.2.8'
'org.springframework:spring-jcl:6.2.8'

// Data Access Modules:
'org.springframework:spring-jdbc:6.2.8'
'org.springframework:spring-orm:6.2.8'
'org.springframework:spring-oxm:6.2.8'
'org.springframework:spring-r2dbc:6.2.8'
'org.springframework:spring-tx:6.2.8'

// Web Framework Modules:
'org.springframework:spring-web:6.2.8'
'org.springframework:spring-webflux:6.2.8'
'org.springframework:spring-webmvc:6.2.8'
'org.springframework:spring-websocket:6.2.8'

// Messaging and Integration:
'org.springframework:spring-jms:6.2.8'
'org.springframework:spring-messaging:6.2.8'

// Testing:
'org.springframework:spring-test:6.2.8'

Platform BOM Management

Imports and manages platform BOMs for consistent third-party dependency versioning.

// Platform BOMs imported by the Spring Framework BOM:
platform('com.fasterxml.jackson:jackson-bom:2.18.4')
platform('io.micrometer:micrometer-bom:1.14.8')
platform('io.netty:netty-bom:4.1.121.Final')
platform('io.netty:netty5-bom:5.0.0.Alpha5')
platform('io.projectreactor:reactor-bom:2024.0.7')
platform('io.rsocket:rsocket-bom:1.1.5')
platform('org.apache.groovy:groovy-bom:4.0.27')
platform('org.apache.logging.log4j:log4j-bom:2.21.1')
platform('org.assertj:assertj-bom:3.27.3')
platform('org.eclipse.jetty:jetty-bom:12.0.21')
platform('org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.21')
platform('org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1')
platform('org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3')
platform('org.junit:junit-bom:5.13.1')
platform('org.mockito:mockito-bom:5.18.0')

Third-Party Dependency Constraints

Provides version constraints for 120+ commonly used third-party libraries to ensure compatibility with Spring Framework.

// Selected third-party library constraints:

// Jakarta EE APIs
'jakarta.servlet:jakarta.servlet-api:6.0.0'
'jakarta.annotation:jakarta.annotation-api:2.0.0'
'jakarta.inject:jakarta.inject-api:2.0.1'
'jakarta.persistence:jakarta.persistence-api:3.0.0'
'jakarta.transaction:jakarta.transaction-api:2.0.1'
'jakarta.validation:jakarta.validation-api:3.0.2'
'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'

// Database and Data Access
'com.h2database:h2:2.3.232'
'com.oracle.database.jdbc:ojdbc11:21.9.0.0'
'org.hsqldb:hsqldb:2.7.4'
'io.r2dbc:r2dbc-spi:1.0.0.RELEASE'

// Web and HTTP
'org.apache.httpcomponents.client5:httpclient5:5.5'
'com.squareup.okhttp3:okhttp:3.14.9'
'io.undertow:undertow-core:2.3.18.Final'

// Application Servers
'org.apache.tomcat.embed:tomcat-embed-core:10.1.28'
'org.eclipse.jetty:jetty-reactive-httpclient:4.0.9'

// Aspect-Oriented Programming
'org.aspectj:aspectjrt:1.9.22.1'
'org.aspectj:aspectjweaver:1.9.22.1'

// Template Engines
'org.freemarker:freemarker:2.3.34'

// Testing Frameworks
'junit:junit:4.13.2'
'org.hamcrest:hamcrest:2.2'
'org.mockito:mockito-core:5.18.0'

// And many more...

Module Descriptions

Core Framework Modules

  • spring-aop: Aspect-Oriented Programming support, enabling cross-cutting concerns
  • spring-aspects: AspectJ integration for compile-time weaving
  • spring-beans: Core IoC container and dependency injection functionality
  • spring-context: Application context, configuration, and resource management
  • spring-context-indexer: Compile-time indexing for faster application startup
  • spring-context-support: Extended context support including caching, scheduling, and mail
  • spring-core: Fundamental utilities and core abstractions
  • spring-core-test: Core testing utilities for Spring applications
  • spring-expression: Spring Expression Language (SpEL) support
  • spring-instrument: Instrumentation support for load-time weaving
  • spring-jcl: Jakarta Commons Logging integration

Data Access Modules

  • spring-jdbc: JDBC data access abstraction and utilities
  • spring-orm: Object-Relational Mapping integration (JPA, Hibernate, etc.)
  • spring-oxm: Object-XML Mapping support for marshalling/unmarshalling
  • spring-r2dbc: Reactive Relational Database Connectivity support
  • spring-tx: Comprehensive transaction management

Web Framework Modules

  • spring-web: Core web support including HTTP clients and servlet utilities
  • spring-webflux: Reactive web framework built on Project Reactor
  • spring-webmvc: Traditional Model-View-Controller web framework
  • spring-websocket: WebSocket protocol support for real-time communication

Messaging and Integration

  • spring-jms: Java Message Service integration for messaging
  • spring-messaging: Messaging abstraction for various messaging systems

Testing

  • spring-test: Comprehensive testing framework with Spring TestContext

Usage Examples

Basic Spring Application

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    
    <groupId>com.example</groupId>
    <artifactId>spring-app</artifactId>
    <version>1.0.0</version>
    
    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>6.2.8</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
    </dependencies>
</project>

Gradle Multi-Module Project

// Root build.gradle
plugins {
    id 'java-platform'
}

dependencies {
    api platform('org.springframework:spring-framework-bom:6.2.8')
}

// Module build.gradle
dependencies {
    implementation platform(project(':platform'))
    
    implementation 'org.springframework:spring-context'
    implementation 'org.springframework:spring-webmvc'
    implementation 'org.springframework:spring-jdbc'
    
    testImplementation 'org.springframework:spring-test'
    testImplementation 'org.junit.jupiter:junit-jupiter'
}

Spring Boot Integration

Spring Boot automatically manages Spring Framework versions, but you can override with the BOM:

dependencies {
    implementation platform('org.springframework:spring-framework-bom:6.2.8')
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
}

Java Application Runtime Examples

The BOM ensures consistent versioning across all Spring dependencies at runtime:

// All these imports use the same Spring Framework version (6.2.8)
// managed by the BOM
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.annotation.Transactional;

@RestController
public class ExampleController {
    
    @Autowired
    private JdbcTemplate jdbcTemplate; // spring-jdbc:6.2.8
    
    @GetMapping("/data")
    @Transactional // spring-tx:6.2.8
    public String getData() {
        // spring-web:6.2.8 and spring-context:6.2.8 working together
        return jdbcTemplate.queryForObject("SELECT 'Hello World'", String.class);
    }
}

The BOM also manages third-party dependencies that Spring Framework depends on:

// Jackson dependency version managed by BOM
import com.fasterxml.jackson.databind.ObjectMapper; // 2.18.4
import com.fasterxml.jackson.core.JsonProcessingException;

// AspectJ version managed by BOM  
import org.aspectj.lang.annotation.Aspect; // 1.9.22.1
import org.aspectj.lang.annotation.Around;

// Jakarta EE APIs version managed by BOM
import jakarta.servlet.http.HttpServletRequest; // 6.0.0
import jakarta.persistence.Entity; // 3.0.0

Version Compatibility

The Spring Framework BOM 6.2.8 provides compatibility constraints for:

  • Java: Requires Java 17 or higher
  • Jakarta EE: Uses Jakarta EE 9+ specifications (jakarta.* namespace)
  • Kotlin: Compatible with Kotlin 1.9.25
  • Build Tools: Maven 3.6.3+, Gradle 7.5+

Types

// Platform dependency import format for Maven
dependency {
    groupId: "org.springframework"
    artifactId: "spring-framework-bom"
    version: "6.2.8"
    type: "pom"
    scope: "import"
}

// Platform dependency import format for Gradle
platform('org.springframework:spring-framework-bom:6.2.8')
Workspace
tessl
Visibility
Public
Created
Last updated
Describes
mavenpkg:maven/org.springframework/spring-framework-bom@6.2.x
Publish Source
CLI
Badge
tessl/maven-org-springframework--spring-framework-bom badge