Update spring.io metadata strategy to use the new API

Prior to this commit, the Spring Boot metadata reader would use a legacy
API endpoint on spring.io to fetch the Spring Boot versions.
The current website is about to be retired for a different
infrastructure and we should take this opportunity to update the
endpoint we're using.

This commit updates the metadata reader strategy to now use the
`https://spring.io/api/projects/spring-boot/releases` endpoint to fetch
the relevant information. The JSON format itself changed slightly and
this commit adapts to the new format as well.

Closes gh-1369
This commit is contained in:
Brian Clozel
2023-01-18 15:02:42 +01:00
parent d9fb4b05b4
commit c1e222901d
15 changed files with 341 additions and 316 deletions

View File

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