具体错误:

[main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [springfox.boot.starter.autoconfigure.OpenApiAutoConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [springfox/documentation/spring/web/SpringfoxWebConfiguration.class] cannot be opened because it does not exist
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:609)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:310)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:249)
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:599)
at org.springframework.context.annotation.ConfigurationClassParser.access800(ConfigurationClassParser.java:110)atorg.springframework.context.annotation.ConfigurationClassParser800(ConfigurationClassParser.java:110) at org.springframework.context.annotation.ConfigurationClassParser800(ConfigurationClassParser.java:110)atorg.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorGroupingHandler.lambda$processGroupImports1(ConfigurationClassParser.java:811)atjava.util.ArrayList.forEach(ArrayList.java:1259)atorg.springframework.context.annotation.ConfigurationClassParser1(ConfigurationClassParser.java:811) at java.util.ArrayList.forEach(ArrayList.java:1259) at org.springframework.context.annotation.ConfigurationClassParser1(ConfigurationClassParser.java:811)atjava.util.ArrayList.forEach(ArrayList.java:1259)atorg.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:808)
at org.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorHandler.process(ConfigurationClassParser.java:779)atorg.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192)atorg.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)atorg.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)atorg.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)atorg.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)atorg.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:315)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1226)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1215)atcom.vito.App.main(App.java:25)Causedby:java.io.FileNotFoundException:classpathresource[springfox/documentation/spring/web/SpringfoxWebConfiguration.class]cannotbeopenedbecauseitdoesnotexistatorg.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)atorg.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56)atorg.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50)atorg.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)atorg.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86)atorg.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73)atorg.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)atorg.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:695)atorg.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorHandler.process(ConfigurationClassParser.java:779) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) at com.vito.App.main(App.java:25) Caused by: java.io.FileNotFoundException: class path resource [springfox/documentation/spring/web/SpringfoxWebConfiguration.class] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56) at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86) at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:695) at org.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorHandler.process(ConfigurationClassParser.java:779)atorg.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192)atorg.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)atorg.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)atorg.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)atorg.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)atorg.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:315)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1226)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1215)atcom.vito.App.main(App.java:25)Causedby:java.io.FileNotFoundException:classpathresource[springfox/documentation/spring/web/SpringfoxWebConfiguration.class]cannotbeopenedbecauseitdoesnotexistatorg.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)atorg.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56)atorg.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50)atorg.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)atorg.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86)atorg.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73)atorg.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)atorg.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:695)atorg.springframework.context.annotation.ConfigurationClassParserSourceClass.getRelated(ConfigurationClassParser.java:1093)
at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getAnnotationAttributes(ConfigurationClassParser.java:1074)
at org.springframework.context.annotation.ConfigurationClassParser.collectImports(ConfigurationClassParser.java:548)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:521)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:310)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:249)
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:599)
… 22 common frames omitted

解决办法:

再配置文件添加生产环境关闭swagger配置:

springfox:documentation:# 总开关(同时设置auto-startup=false,否则/v3/api-docs等接口仍能继续访问)enabled: falseauto-startup: falseswagger-ui:enabled: false

SpringBoot微服务项目报错:Failed to process import candidates for configuration class [springfox.boot...相关推荐

  1. Failed to process import candidates for configuration class [cn.zlc.eurekaservice.EurekaServiceAppl

    1.问题描述:在一个项目中添加了一个eureka注册中心服务端子模块,eureka模块依赖为在这里插入代码片 <?xml version="1.0" encoding=&qu ...

  2. Failed to process import candidates for configuration class [com.wjm.springcloud.Application]; neste

    Failed to process import candidates for configuration class [com.wjm.springcloud.Application]; neste ...

  3. centos7 network网络服务重启报错failed to start lsb

    network网络服务重启报错failed to start lsb 解决办法: 先看log里哪个网卡没有启动 cat /var/log/messages | grep network 查看网卡mac ...

  4. Docker Compose配置springboot微服务项目

    [Docker那些事]系列文章 docker 安装 与 卸载 centos Dockerfile 文件结构.docker镜像构建过程详细介绍 Dockerfile文件中CMD指令与ENTRYPOINT ...

  5. 淘淘商城项目报错 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-

    @[TOC](淘淘商城项目报错 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (d ...

  6. SpringBoot微服务项目构建war包 部署排除指定jar

    文章目录 一.构建war包部署SpringBoot项目 二.构建war包 2.1. 适用范围 2.2. 构建war包 三.部署排除指定jar 3.1. 下载排除插件 3.2. 搜索部署排除指定jar ...

  7. 启动项目报错 Failed to bind properties under

    报错信息: Description:Failed to bind properties under 'mapper.mappers' to java.util.List<java.lang.Cl ...

  8. SSH 服务 异常报错“Failed to start OpenSSH Server daemon” 该怎么办???

    Linux系统环境 centos 7 SSH无法正常启动,运行service sshd status 结果如下: 提示:sshd服务加载失败...... 这时应当接着输入sshd -t 检查如下: 报 ...

  9. idea 创建maven项目报错: Failed to create parent directories for tracking file

    由于最近想换成idea开发,但是在创建maven项目的时候报了: Failed to create parent directories for tracking file,这个错误我在看了下错误的信 ...

最新文章

  1. Datatable中对某列求和,三种不同情况下的方法 .
  2. EventBank闪耀企业服务 荣获“2017中国企业服务云年度产品”奖
  3. webuploader 跨域
  4. iframe 中 js 的 cookie 读写不到的解决办法
  5. linux mysql ibd_MySQL:如何从ibd文件中恢复数据
  6. 23种设计模式的优点与缺点概况
  7. android学习者优秀网址推荐
  8. 高德地图怎么搜索marker_2018-07-06 高德地图搜索定位,滑动地图显示周边信息,根据地址搜经...
  9. 《想吃麻花现给你拧》
  10. Irrlicht例002--Quake3Map
  11. 常用 API 函数(7): 位图、图标和光栅运算函数
  12. 小白想进入IT行业,迷茫选什么职业?
  13. IP-Guard申请外发流程说明
  14. 使用POI操作Excel的基本读写
  15. ES集群状态一直yellow状态引发的思考
  16. 短视频SDK测试tips
  17. 【VMware】VMware虚拟机与主机之间文件共享配置
  18. 回答几个很多人在问的问题,以及苏生不惑提供的服务
  19. 小程序微信支付功能开发
  20. 电竞英雄联盟数据API接口 - 【联赛列表】API调用示例代码

热门文章

  1. 大数据开发个人学习规划
  2. 移动端Swiper的一些尝试(中间完整,两边有内容,循环展示)
  3. oracle监听程序的配置
  4. codemirror 5.2版本实现自定义提示
  5. 争当 2% 的人——《智能时代 · 大数据与智能革命重新定义未来》读书笔记
  6. 加利福尼亚理工学院鸟类数据库-2011(Caltech-UCSD Birds-200-2011)
  7. 暑期练习web25:web code(i春秋)index.php文件包含、base64图片加密
  8. 鲁大师Q1季度电脑硬件报告:intel 12代酷睿笔记本霸榜,显卡小幅降价
  9. 在matlab中chrom,一段matlab程序,其中chrom(i,j)=p(chrom(i,j),j)是什么意思
  10. win11点击任务栏音量、无线、电池按钮无反应