Failed to start bean ‘documentationPluginsBootstrapper’
报错详情
2020-10-12 10:31:27.880 WARN 12548 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NoSuchMethodError: com.google.common.collect.FluentIterable.append(Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable;
2020-10-12 10:31:27.903 WARN 12548 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2020-10-12 10:31:27.903 INFO 12548 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-10-12 10:31:27.907 INFO 12548 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'tpAsyncLogFileExecutor'
2020-10-12 10:31:27.914 INFO 12548 --- [ main] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
2020-10-12 10:31:27.917 INFO 12548 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_CIM-CI/DESKTOP-UHNEPQU:cim-ci:8202 - registration status: 204
2020-10-12 10:31:27.918 INFO 12548 --- [ main] com.netflix.discovery.DiscoveryClient : Unregistering ...
2020-10-12 10:31:27.970 INFO 12548 --- [ main] com.netflix.discovery.DiscoveryClient : DiscoveryClient_CIM-CI/DESKTOP-UHNEPQU:cim-ci:8202 - deregister status: 200
2020-10-12 10:31:27.980 INFO 12548 --- [ main] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
2020-10-12 10:31:27.981 INFO 12548 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-10-12 10:31:28.075 INFO 12548 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-10-12 10:31:28.085 ERROR 12548 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call the method com.google.common.collect.FluentIterable.append(Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable; but it does not exist. Its class, com.google.common.collect.FluentIterable, is available from the following locations:
jar:file:/E:/maven3.6.3/mavenRepo/repository/com/google/guava/guava/15.0/guava-15.0.jar!/com/google/common/collect/FluentIterable.class
It was loaded from the following location:
file:/E:/maven3.6.3/mavenRepo/repository/com/google/guava/guava/15.0/guava-15.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.FluentIterable
使用swagger2出现这个异常,百度后发现这个问题是因为swagger依赖google的guava,而你当前项目的guava版本与之不匹配,而我因为使用当前最新的swagger2版本,我就将guava升到最新的版本,pom文件修改如下即可
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>25.1-jre</version>
</dependency>