简体   繁体   English

Spring 引导与此 Spring 云发布火车不兼容

[英]Spring Boot is not compatible with this Spring Cloud release train

I am trying to create shaded jar for my spring project with bellow pom.xml, which runs fine in IDE but when I run mvn clean package and execute the jar with java -jar.\flink-0.0.1-SNAPSHOT-test.jar I am getting: I am trying to create shaded jar for my spring project with bellow pom.xml, which runs fine in IDE but when I run mvn clean package and execute the jar with java -jar.\flink-0.0.1-SNAPSHOT-test.jar我正进入(状态:

Your project setup is incompatible with our requirements due to following reasons:由于以下原因,您的项目设置与我们的要求不兼容:

  • Spring Boot [0.0.1-SNAPSHOT] is not compatible with this Spring Cloud release train Spring Boot [0.0.1-SNAPSHOT] 与此 Spring 云发布火车不兼容
  • Change Spring Boot version to one of the following versions [2.6.x, 2.7.x].将 Spring 引导版本更改为以下版本之一 [2.6.x, 2.7.x]。

I checked spring cloud compability matrix where spring cloud 2021.0.x is compatible with spring boot 2.6.x.我检查了 spring 云兼容性矩阵,其中 spring 云 2021.0.x 与 spring 启动 2.6.x 兼容。

<groupId>com.example</groupId>
<artifactId>flink</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>flink</name>
<description>flink</description>

<properties>
    <spring-cloud.version>2021.0.1</spring-cloud.version>
</properties>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.6.8</version>
</parent>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-config</artifactId>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <shadedArtifactAttached>true</shadedArtifactAttached>
                        <shadedClassifierName>test</shadedClassifierName>
                        <transformers>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                <resource>META-INF/spring.handlers</resource>
                            </transformer>
                            <transformer
                                    implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                                <resource>META-INF/spring.factories</resource>
                            </transformer>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                <resource>META-INF/spring.schemas</resource>
                            </transformer>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <mainClass>com.example.Application</mainClass>
                            </transformer>
                        </transformers>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Project currently contain only single Main Class:项目目前仅包含单个 Main Class:

@SpringBootApplication
public class Application
{
    public static void main(String[] args)
    {
        SpringApplication.run(Application.class, args);
    }
}

Shading the jar means that the version compatibility that checks the manifest is broken.对 jar 进行着色表示检查清单的版本兼容性已损坏。 Set spring.cloud.compatibility-verifier.enabled=false设置spring.cloud.compatibility-verifier.enabled=false

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取 Spring Boot [2.7.0] is not compatible with this Spring Cloud release train 错误 - getting Spring Boot [2.7.0] is not compatible with this Spring Cloud release train error Spring 引导升级到 2.6.0 不兼容 Spring 云发布火车 - Spring Boot upgrade to 2.6.0 not compatible with Spring Cloud release train Spring Cloud / Stream / Spring Boot的依赖关系管理和发布培训 - Dependency Mgmt and Release Train for Spring Cloud / Stream / Spring Boot Spring Cloud 版本兼容 Spring Boot 2.5.5 - Spring Cloud Version compatible for Spring Boot 2.5.5 Spring Cloud Hoxton.SR3 是否与 Spring Boot 2.3.11 兼容? - Does Spring Cloud Hoxton.SR3 compatible with Spring Boot 2.3.11? 哪个Javers版本与Spring Boot 1.0.1。兼容 - Which version of Javers is compatible with spring boot 1.0.1.RELEASE Spring Cloud Stream Kafka Binder and Spring Cloud Azure EventHub compatible version for Spring Boot &gt;1.5.20 - Spring Cloud Stream Kafka Binder and Spring Cloud Azure EventHub compatible version for Spring Boot >1.5.20 如何使用Gradle with Spring Boot获取Gosling Release Train of Spring数据? - How to use Gradle with Spring Boot to get Gosling Release Train of Spring data? 在 Spring Boot Gradle 插件中切换 Spring Data 发布序列的正确方法 - Proper way to switch Spring Data release train in Spring Boot Gradle Plugin 如何编写带有Spring Boot(1.5.3.RELEASE)和Spring Cloud Config(1.3.0.RELEASE)的Spring Cloud Config服务器? - How do you write a Spring Cloud Config Server with Spring Boot (1.5.3.RELEASE) and Spring Cloud Config (1.3.0.RELEASE)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM