Skip to content

Spring Framework Artifacts

Sam Brannen edited this page Feb 24, 2024 · 16 revisions

This document describes how to access Spring Framework artifacts. For snippets of POM configuration go to Maven Central or Spring Repositories. For more in-depth information about Spring repositories see the Spring Artifactory page.

The Spring Framework is modular and publishes 20+ different jars:

spring-aop              spring-core        spring-jms        spring-tx
spring-aspects          spring-core-test   spring-messaging  spring-web
spring-beans            spring-expression  spring-orm        spring-webflux
spring-context          spring-instrument  spring-oxm        spring-webmvc
spring-context-indexer  spring-jcl         spring-r2dbc      spring-websocket
spring-context-support  spring-jdbc        spring-test

Some modules are interdependent. For example spring-context depends on spring-beans which in turn depends on spring-core. There are no required external dependencies although each module has optional dependencies and some of those may be required depending on what functionality the application needs.

There is no single "spring-all" jar that includes all modules.

Maven Central

The Spring Framework publishes GA (general availability) versions to Maven Central which is automatically searched when using Maven or Gradle, so just add the dependencies to your project's build script:

Maven

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>6.1.4</version>
</dependency>

Gradle

implementation 'org.springframework:spring-context:6.1.4'

Spring Repositories

Snapshot, milestone, and release candidate versions are published to an Artifactory instance hosted by JFrog. You can use the Web UI at https://repo.spring.io to browse the Spring Artifactory, or go directly to one of the repositories listed below.

Snapshots

Add the following to resolve snapshot versions – for example, 6.1.5-SNAPSHOT:

Maven

<repositories>
  <repository>
    <id>spring-snapshots</id>
    <name>Spring Snapshots</name>
    <url>https://repo.spring.io/snapshot</url>
    <releases>
      <enabled>false</enabled>
    </releases>
  </repository>
</repositories>
...

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>6.1.5-SNAPSHOT</version>
</dependency>

Gradle

repositories {
    mavenCentral()
    maven {
        url "https://repo.spring.io/snapshot"
    }
}

...

dependencies {
    implementation 'org.springframework:spring-context:6.1.5-SNAPSHOT'
}

Milestones and Release Candidates

Add the following to resolve milestone and RC versions – for example, 6.2.0-M1 or 6.2.0-RC1:

Maven

<repositories>
  <repository>
    <id>spring-milestones</id>
    <name>Spring Milestones</name>
    <url>https://repo.spring.io/milestone</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>
...

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>6.2.0-M1</version>
</dependency>

Gradle

repositories {
    mavenCentral()
    maven {
        url "https://repo.spring.io/milestone"
    }
}

...

dependencies {
    implementation 'org.springframework:spring-context:6.2.0-M1'
}