-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Spring Framework Artifacts
This document describes how to access Spring Framework artifacts. For snippets of POM configuration go to Maven Central or Spring Repositories.
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.
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:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>6.1.4</version>
</dependency>
implementation 'org.springframework:spring-context:6.1.4'
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.
Add the following to resolve snapshot versions – for example, 6.1.5-SNAPSHOT
:
<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>
repositories {
mavenCentral()
maven {
url "https://repo.spring.io/snapshot"
}
}
...
dependencies {
implementation 'org.springframework:spring-context:6.1.5-SNAPSHOT'
}
Add the following to resolve milestone and RC versions – for example, 6.2.0-M1
or 6.2.0-RC1
:
<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>
repositories {
mavenCentral()
maven {
url "https://repo.spring.io/milestone"
}
}
...
dependencies {
implementation 'org.springframework:spring-context:6.2.0-M1'
}