以下是父依赖关系
<parent>
<groupId>com.rabu.practor</groupId>
<artifactId>integrator</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>我想让项目作为spring boot项目,而不涉及父母的包含,我不允许改变父母。
以下是正在使用的版本
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.9.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>2.24.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>以下是当前项目中的驼峰依赖关系:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-infinispan</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cdi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
</dependency>有谁能帮我在spring boot中实现它吗?
发布于 2019-10-07 13:50:53
您可以通过使用scope=import添加spring-boot-dependencies工件来获得spring-boot依赖项管理的好处。
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.9.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>如果没有父POM,您将无法再从插件管理中获益。您需要显式添加spring-boot-maven-plugin。
要对某个依赖项使用不同于Boot管理的依赖项的版本,您需要在声明spring-boot-dependencies之前在dependencyManagement部分中声明它。
https://stackoverflow.com/questions/58263743
复制相似问题