1. 之前的
mybatis配置 swagger 后项目总是跑不起来,报错如下:
Description:
An attempt was made to call the method com.google.common.cache.CacheBuilder.maximumSize(J)Lcom/google/common/cache/CacheBuilder; but it does not exist. Its class, com.google.common.cache.CacheBuilder, is available from the following locations:
jar:file:/C:/Users/Scl/.m2/repository/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar!/com/google/common/cache/CacheBuilder.class
jar:file:/C:/Users/Scl/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar!/com/google/common/cache/CacheBuilder.class
It was loaded from the following location:
file:/C:/Users/Scl/.m2/repository/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.common.cache.CacheBuilder
Disconnected from the target VM, address: '127.0.0.1:62836', transport: 'socket'
Process finished with exit code 1
被这个问题困扰了一段时间,后来发现我使用的mybatis-generator-maven-plugin 版本是1.3.2,此版本是2012的,比较旧,就换成了最新的1.3.7 maven 重新依赖下,问题解决~