1 依赖jar写法注意版本
在父maven中定义好
<dependency>
<groupId>com.fomoney</groupId>
<artifactId>performance-monitoring</artifactId>
<version>${performance-monitoring.version}</version>
</dependency>
<performance-monitoring.version>1.0.3-SNAPSHOT</performance-monitoring.version>
子工程不需要写版本
<dependency>
<groupId>com.fomoney</groupId>
<artifactId>performance-monitoring</artifactId>
</dependency>
2 另外 父pom依赖依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
</parent>
所有的子工程里面的jar的版本要和spring-boot 1.5.4.RELEASE 保持一致
具体文件地址
C:\Users\Administrator\.m2\repository\org\springframework
\boot\spring-boot-dependencies\1.5.4.RELEASE
对于子pom文件如下依赖的版本 也不需要版本号
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
对于一些独立项目 不需要依赖父pom的需要写版本号的,保本好要和上面文件的版本
保持一致 (C:\Users\Administrator\.m2\repository\org\springframework
\boot\spring-boot-dependencies\1.5.4.RELEASE)
在父maven中定义好
<dependency>
<groupId>com.fomoney</groupId>
<artifactId>performance-monitoring</artifactId>
<version>${performance-monitoring.version}</version>
</dependency>
<performance-monitoring.version>1.0.3-SNAPSHOT</performance-monitoring.version>
子工程不需要写版本
<dependency>
<groupId>com.fomoney</groupId>
<artifactId>performance-monitoring</artifactId>
</dependency>
2 另外 父pom依赖依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
</parent>
所有的子工程里面的jar的版本要和spring-boot 1.5.4.RELEASE 保持一致
具体文件地址
C:\Users\Administrator\.m2\repository\org\springframework
\boot\spring-boot-dependencies\1.5.4.RELEASE
对于子pom文件如下依赖的版本 也不需要版本号
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
对于一些独立项目 不需要依赖父pom的需要写版本号的,保本好要和上面文件的版本
保持一致 (C:\Users\Administrator\.m2\repository\org\springframework
\boot\spring-boot-dependencies\1.5.4.RELEASE)