azure-spring-apps-training
azure-spring-apps-training copied to clipboard
Update Spring Boot Version and Adjust Dependencies
Summary
This pull request addresses issues related to outdated Spring Boot version and incorrect dependencies in the Spring initializer commands.
Changes Made
-
Update Spring Boot Version:
- The commands previously used Spring Boot version
3.1.3
, which is no longer available on start.spring.io. - Updated the Spring Boot version to
3.3.2
.
curl https://start.spring.io/starter.tgz -d type=maven-project -d dependencies=web -d baseDir=simple-microservice -d bootVersion=3.3.2 -d javaVersion=17 | tar -xzvf -
- The commands previously used Spring Boot version
-
Adjust Dependency for Cloud Gateway:
- Changed the dependency from
cloud-gateway
tocloud-gateway-reactive
. - The
cloud-gateway
dependency was incorrectly loadingspring-cloud-starter-gateway-mvc
instead ofspring-cloud-starter-gateway
, causing mismatches inapplication.yml
and gateway malfunctions.
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> </dependency>
- Changed the dependency from
Reason for Changes
-
Spring Boot Version Error: Running the command with version
3.1.3
results in aBad Request
error due to the version being outside the compatibility range. Below is the error message encountered:{ "timestamp":"2024-07-24T07:15:12.386+00:00", "status":400, "error":"Bad Request", "message":"Invalid Spring Boot version '3.1.3', Spring Boot compatibility range is >=3.2.0", "path":"/starter.tgz" }
-
Dependency Issue: The incorrect
cloud-gateway
dependency was leading to the inclusion ofspring-cloud-starter-gateway-mvc
instead ofspring-cloud-starter-gateway
, causing configuration issues and non-functional gateway setup.
Please review these changes and let me know if any further adjustments are needed. Thank you!