记录下问题和解决方式,以便以后查阅。
异常信息
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
springfox.documentation.spring.web.scanners.ApiListingReferenceScanner.scan(ApiListingReferenceScanner.java:59)
The following method did not exist:
com.google.common.collect.Multimaps.asMap(Lcom/google/common/collect/ListMultimap;)Ljava/util/Map;
The method's class, com.google.common.collect.Multimaps, is available from the following locations:
jar:file:/Users/baichao/.m2/repository/org/apache/hive/hive-exec/1.1.1/hive-exec-1.1.1.jar!/com/google/common/collect/Multimaps.class
jar:file:/Users/baichao/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar!/com/google/common/collect/Multimaps.class
The class hierarchy was loaded from the following locations:
com.google.common.collect.Multimaps: file:/Users/baichao/.m2/repository/org/apache/hive/hive-exec/1.1.1/hive-exec-1.1.1.jar
可以看到,报错原因是 /com/google/common/collect/Multimaps.class 类在多个依赖包中都有
不知道为啥hive-exec包下也会有这个代码,感觉像是复制使用的,正常上图导入的方法应该来自于 com.google.guava ,但是却指向了hive-exec,这种情况没法使用maven依赖排除,除非排除掉整个hive-exec包,解决方式也很简单,我们只需要在当前项目pom内再次手动声明下 com.google.guava 包即可
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
问题解决。
结束
最后给vue开发的小伙伴推荐一款表单设计器:JForm表单设计器