The Spring cloud project is typically a parent project with more than one child service, which is the Submodule module.
Such as:
problem Description: A common jar package is referenced in the parent project, for example, the spring boot dependency is introduced, then the introduction of the jar package in the subproject does not specify version, so the downloaded jar package is unknown
Analyze the problem:
Because the jars used in the subproject are all spring cloud-related jar packages, you must specify Spring-cloud unified management in the parent project's Pom.xml file in order for the Child project to reference the spring Cloud-related JAR packages do not specify the jar package version, and there is no unknown problem
Solve the problem:
Add code to the parent project's Pom.xml file
<dependencyManagement> <dependencies> <dependency> <groupId> Org.springframework.cloud</groupid> <artifactId>spring-cloud-dependencies</artifactId> <version>Dalston.SR1</version> <type>pom</type> <scope>import</ scope> </dependency> </dependencies> </dependencyManagement>
View Code
Such as:
"Spring Cloud" Spring Cloud sub-module Pom file added dependency, unknown problem "maven" appears