Update Projects API URL for fetching Spring Boot metadata

This commit updates (again) the URL used by Initializr clients to fetch
metadata for the Spring Boot project.
Since the Sagan application is being retired, this API has now migrated
to https://api.spring.io

See gh-1369
This commit is contained in:
Brian Clozel 2023-01-26 18:27:59 +01:00
parent c1e222901d
commit 7ea72e72d9
8 changed files with 25 additions and 25 deletions

View File

@ -1153,7 +1153,7 @@ automatically:
[[create-instance-advanced-config-caching]]
=== Caching configuration
If you use the service, you'll notice that the logs have lots of entries with the message
`Fetching boot metadata from https://spring.io/api/projects/spring-boot/releases`. To avoid
`Fetching boot metadata from https://api.spring.io/projects/spring-boot/releases`. To avoid
checking for the latest Spring Boot versions too often, you should enable caching on your
service. Spring Initializr has some auto-configuration to apply the proper caches if you
are willing to use a JCache (JSR-107) implementation.

View File

@ -179,7 +179,7 @@ public class InitializrConfiguration {
/**
* The metadata url of the Spring Boot project.
*/
private String springBootMetadataUrl = "https://spring.io/api/projects/spring-boot/releases";
private String springBootMetadataUrl = "https://api.spring.io/projects/spring-boot/releases";
/**
* Tracking code for Google Analytics. Only enabled if a value is explicitly

View File

@ -51,7 +51,7 @@ When you issue your first request, you should see something like the following:
[indent=0]
----
Fetching Spring Boot metadata from https://spring.io/api/projects/spring-boot/releases
Fetching Spring Boot metadata from https://api.spring.io/projects/spring-boot/releases
----
On further request, you won't see this log entry as the content is cached.

View File

@ -52,7 +52,7 @@ class SpringBootMetadataReaderTests {
@Test
void readAvailableVersions() throws IOException {
this.server.expect(requestTo("https://spring.io/api/projects/spring-boot/releases")).andRespond(
this.server.expect(requestTo("https://api.spring.io/projects/spring-boot/releases")).andRespond(
withSuccess(new ClassPathResource("metadata/springio/spring-boot.json"), MediaType.APPLICATION_JSON));
List<DefaultMetadataElement> versions = new SpringBootMetadataReader(this.objectMapper, this.restTemplate,
this.metadata.getConfiguration().getEnv().getSpringBootMetadataUrl()).getBootVersions();
@ -69,7 +69,7 @@ class SpringBootMetadataReaderTests {
@Test
void readAvailableVersionsWithInvalidVersion() throws IOException {
this.server.expect(requestTo("https://spring.io/api/projects/spring-boot/releases"))
this.server.expect(requestTo("https://api.spring.io/projects/spring-boot/releases"))
.andRespond(withSuccess(new ClassPathResource("metadata/springio/spring-boot-invalid-version.json"),
MediaType.APPLICATION_JSON));
List<DefaultMetadataElement> versions = new SpringBootMetadataReader(this.objectMapper, this.restTemplate,

View File

@ -137,7 +137,7 @@
"version": "1.0.0.RELEASE"
}
},
"springBootMetadataUrl": "https://spring.io/api/projects/spring-boot/releases"
"springBootMetadataUrl": "https://api.spring.io/projects/spring-boot/releases"
}},
"dependencies": {
"content": [

View File

@ -9,7 +9,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/3.0.2-SNAPSHOT/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/3.0.2-SNAPSHOT"
"href": "https://api.spring.io/projects/spring-boot/releases/3.0.2-SNAPSHOT"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-snapshots"
@ -24,7 +24,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/current/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/3.0.1"
"href": "https://api.spring.io/projects/spring-boot/releases/3.0.1"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -35,7 +35,7 @@
},
"_links": {
"current": {
"href": "https://spring.io/api/projects/spring-boot/releases/current"
"href": "https://api.spring.io/projects/spring-boot/releases/current"
},
"project": {
"href": "https://spring.io/api/projects/spring-boot"

View File

@ -9,7 +9,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/3.0.2-SNAPSHOT/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/3.0.2-SNAPSHOT"
"href": "https://api.spring.io/projects/spring-boot/releases/3.0.2-SNAPSHOT"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-snapshots"
@ -24,7 +24,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/current/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/3.0.1"
"href": "https://api.spring.io/projects/spring-boot/releases/3.0.1"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -39,7 +39,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.7.8-SNAPSHOT/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.7.8-SNAPSHOT"
"href": "https://api.spring.io/projects/spring-boot/releases/2.7.8-SNAPSHOT"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-snapshots"
@ -54,7 +54,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.7.7/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.7.7"
"href": "https://api.spring.io/projects/spring-boot/releases/2.7.7"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -69,7 +69,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.6.14/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.6.14"
"href": "https://api.spring.io/projects/spring-boot/releases/2.6.14"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -84,7 +84,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.5.14/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.5.14"
"href": "https://api.spring.io/projects/spring-boot/releases/2.5.14"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -99,7 +99,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.4.13/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.4.13"
"href": "https://api.spring.io/projects/spring-boot/releases/2.4.13"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -110,7 +110,7 @@
},
"_links": {
"current": {
"href": "https://spring.io/api/projects/spring-boot/releases/current"
"href": "https://api.spring.io/projects/spring-boot/releases/current"
},
"project": {
"href": "https://spring.io/api/projects/spring-boot"

View File

@ -9,7 +9,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/3.0.2-SNAPSHOT/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/3.0.2-SNAPSHOT"
"href": "https://api.spring.io/projects/spring-boot/releases/3.0.2-SNAPSHOT"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-snapshots"
@ -24,7 +24,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/current/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/3.0.1"
"href": "https://api.spring.io/projects/spring-boot/releases/3.0.1"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -39,7 +39,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.7.8-SNAPSHOT/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.7.8-SNAPSHOT"
"href": "https://api.spring.io/projects/spring-boot/releases/2.7.8-SNAPSHOT"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-snapshots"
@ -54,7 +54,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.7.7/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.7.7"
"href": "https://api.spring.io/projects/spring-boot/releases/2.7.7"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -69,7 +69,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.6.14/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.6.14"
"href": "https://api.spring.io/projects/spring-boot/releases/2.6.14"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -84,7 +84,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.5.14/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.5.14"
"href": "https://api.spring.io/projects/spring-boot/releases/2.5.14"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -99,7 +99,7 @@
"apiDocUrl": "https://docs.spring.io/spring-boot/docs/2.4.13/api/",
"_links": {
"self": {
"href": "https://spring.io/api/projects/spring-boot/releases/2.4.13"
"href": "https://api.spring.io/projects/spring-boot/releases/2.4.13"
},
"repository": {
"href": "https://spring.io/api/repositories/spring-releases"
@ -110,7 +110,7 @@
},
"_links": {
"current": {
"href": "https://spring.io/api/projects/spring-boot/releases/current"
"href": "https://api.spring.io/projects/spring-boot/releases/current"
},
"project": {
"href": "https://spring.io/api/projects/spring-boot"