2.Exception in thread "main" java.lang.IllegalArgumentException
找不到依赖包的错误
1.经过排查是在父项目中导入的依赖没有使用pom和import方式导致子项目中无法确定父项目中的springboot版本
<!-- 一定要pom+import导入不然子项目会找不到父项目--> <!-- springCloud依赖 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Greenwich.SR1</version> <type>pom</type> <scope>import</scope> </dependency> <!-- springBoot依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.1.4.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency>
2.虽然在子项目中人为的定制版本为2.1.4但是依旧会导致springboot版本不一致的问题,盲猜spring-boot-dependences的版本和springboot其他组件的版本是不一致的
3.历时3小时,想弄死自己orz