Skip to content

Conversation

@tacu90
Copy link

@tacu90 tacu90 commented Jul 24, 2024

Summary

This pull request addresses issues related to outdated Spring Boot version and incorrect dependencies in the Spring initializer commands.

Changes Made

  1. 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 -
  2. Adjust Dependency for Cloud Gateway:

    • Changed the dependency from cloud-gateway to cloud-gateway-reactive.
    • The cloud-gateway dependency was incorrectly loading spring-cloud-starter-gateway-mvc instead of spring-cloud-starter-gateway, causing mismatches in application.yml and gateway malfunctions.
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
    </dependency>

Reason for Changes

  • Spring Boot Version Error:
    Running the command with version 3.1.3 results in a Bad 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 of spring-cloud-starter-gateway-mvc instead of spring-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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant