我在我的 Spring Boot 应用程序中使用以下 pom:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.13.RELEASE</version>
<relativePath /><!-- resolve parent from repository, refer to http://www.tomitribe.com/blog/2016/06/i-do-not-hate-apache-maven/ -->
</parent>
<dependencies>
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<artifactId>mongock-bom</artifactId>
<version>4.3.8</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<artifactId>mongock-spring-v5</artifactId>
<version>4.3.8</version>
</dependency>
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<artifactId>mongodb-springdata-v3-driver</artifactId>
<version>4.3.8</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>2.2.12.RELEASE</version>
</dependency>
</dependencies>
当我运行应用程序时,java -jar my-app.jar
出现以下错误:
NoClassDefFoundError org/springframework/data/mongodb/MongoDatabaseFactory
但是当我用-noverify
它运行应用程序时似乎一切正常
拜托,有人可以帮我吗?