IDEA2020.2启动 springboot项目报错 Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

摘要:
完整的错误报告如下。_________//___'_____(_)______ (()\___|'_|'_||'_/_`|\/___)||_)||||||| (_||))))'|____|.__|_||_|_||_\__,|////=========|_|==============|___/=/_/_/_/:: SpringBoot::(v2.1.2.RELEASE)2021-06-2115:06:1

完整报错内容如下

  .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _    
( ( )\___ | '_ | '_| | '_ / _` |    
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.2.RELEASE)

2021-06-21 15:06:14.172 -> [restartedMain] -> INFO  com.peraglobal.SpringbootStart - Starting SpringbootStart on DESKTOP-6PIF92K with PID 22020 (D:CodeJAVACodeGroupCodeipo-cloud-local	argetclasses started by JxzCode in D:CodeJAVACodeGroupCodeipo-cloud-local)
2021-06-21 15:06:14.174 -> [restartedMain] -> DEBUG com.peraglobal.SpringbootStart - Running with Spring Boot v2.1.2.RELEASE, Spring v5.1.4.RELEASE
2021-06-21 15:06:14.174 -> [restartedMain] -> INFO  com.peraglobal.SpringbootStart - The following profiles are active: param,dev
2021-06-21 15:06:14.257 -> [restartedMain] -> INFO  o.s.b.d.env.DevToolsPropertyDefaultsPostProcessor - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2021-06-21 15:06:14.257 -> [restartedMain] -> INFO  o.s.b.d.env.DevToolsPropertyDefaultsPostProcessor - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2021-06-21 15:06:16.272 -> [restartedMain] -> INFO  o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
2021-06-21 15:06:16.277 -> [restartedMain] -> INFO  o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
2021-06-21 15:06:16.427 -> [restartedMain] -> INFO  o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 125ms. Found 0 repository interfaces.
2021-06-21 15:06:17.341 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$9af8149b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:17.771 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroConfig' of type [com.peraglobal.framework.shiro.config.ShiroConfig$$EnhancerBySpringCGLIB$$f13a5eae] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:17.803 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'cacheManager' of type [org.apache.shiro.cache.MemoryConstrainedCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.100 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'rememberMeManager' of type [org.apache.shiro.web.mgt.CookieRememberMeManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.150 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'hashedCredentialsMatcher' of type [org.apache.shiro.authc.credential.HashedCredentialsMatcher] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.205 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'masterDataSourceConfig' of type [com.peraglobal.framework.datasource.MasterDataSourceConfig$$EnhancerBySpringCGLIB$$47050ea8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.378 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.396 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'com.alibaba.druid.spring.boot.autoconfigure.stat.DruidFilterConfiguration' of type [com.alibaba.druid.spring.boot.autoconfigure.stat.DruidFilterConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.441 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'statFilter' of type [com.alibaba.druid.filter.stat.StatFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:19.545 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'masterDataSource' of type [com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.364 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'masterSqlSessionFactory' of type [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.372 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userMapper' of type [org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.377 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userMapper' of type [com.sun.proxy.$Proxy85] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.381 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'enterpriseMapper' of type [org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.383 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'enterpriseMapper' of type [com.sun.proxy.$Proxy87] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.385 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'departmentMapper' of type [org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.387 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'departmentMapper' of type [com.sun.proxy.$Proxy88] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.393 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'sysParamConfig' of type [com.peraglobal.framework.config.SysParamConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.395 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroRealm' of type [com.peraglobal.framework.shiro.realm.UserRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.410 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userOnlineMapper' of type [org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.412 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userOnlineMapper' of type [com.sun.proxy.$Proxy89] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.413 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userOnlineService' of type [com.peraglobal.project.system.service.impl.UserOnlineServiceImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.414 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroService' of type [com.peraglobal.framework.shiro.service.ShiroService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.415 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'sessionDAO' of type [com.peraglobal.framework.shiro.session.OnlineSessionDAO] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.418 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'sessionFactory' of type [com.peraglobal.framework.shiro.session.OnlineSessionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.420 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'sessionManager' of type [com.peraglobal.framework.shiro.web.session.OnlineWebSessionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.426 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'securityManager' of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.441 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'getAuthorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.451 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'onlineSessionFilter' of type [com.peraglobal.framework.shiro.filter.online.OnlineSessionFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.458 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'syncOnlineSessionFilter' of type [com.peraglobal.framework.shiro.filter.sync.SyncOnlineSessionFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.464 -> [restartedMain] -> INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'accessTokenFilter' of type [com.peraglobal.framework.shiro.filter.AccessTokenFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-06-21 15:06:20.493 -> [restartedMain] -> WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
2021-06-21 15:06:20.505 -> [restartedMain] -> INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-06-21 15:06:20.509 -> [restartedMain] -> ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
    at com.peraglobal.SpringbootStart.main(SpringbootStart.java:20)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:206)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
    ... 13 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:62989', transport: 'socket'

Process finished with exit code 0

分析原因:

springboot项目配置文件pom.xm里,有关springboot的依赖tomcat有如下配置:

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
</dependency>
<scope>provided</scope>:表示产于编译运行,但不参与打包,打包由生产环境提供。

解决办法:

打开:Edit Configurations...,勾上Include dependencies with “Provided” scope,点击Apply,OK,然后重新编译运行即可。

IDEA2020.2启动 springboot项目报错 Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.第1张

IDEA2020.2启动 springboot项目报错 Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.第2张


参考资料:https://www.freesion.com/article/444730706/

免责声明:文章转载自《IDEA2020.2启动 springboot项目报错 Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Python GUI工具Tkinter以及拖拉工具Page安装selenium实现淘宝的商品爬取下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

随便看看

压倒程序员的最后一个面试题,iOS性能优化的面试题

以及如何进行性能优化?关于instruments网上有很多资料,作为一个合格iOS开发者,熟悉这个工具还是很有必要的。一个tableview维持一个队列的数据可重用的UITableViewCell对象。这一过程即为Blending。在运行中缩放图片是很耗费资源的,特别是UIImageView嵌套在UIScrollView中的情况下。...

IPI 通信(SMP)【转】

在MIPS架构下的IPI通信被关闭和中断后,IPIMIPS接口结构平台也将被发送_ smp_Ops{void;void;…}IPI通信是多个处理器之间的通信。send_ ipi_Single:一对一聊天send_ ipi_Mask:Mask posting,Mask表示Mask posting/*Octeon Tellanothercore of Lushi...

微软新一代输入法框架 TSF

目前,市场上的非微软中文输入法基本上只实现IMM框架。自Windows XP开始以来,Windows提供了一个基于COM的新输入框架TSF。但是,Windows Vista和Windows 7用户也可以使用各种基于IMM的输入方法,因为Windows提供了一个组件来将所有TSF请求转换为IMM API。很可能,因为Win8下的许多Imm函数无法使用。)根据微...

pycharm最新版本激活码(永久有效) python安装教程

输入python以查看当前版本的python。您可以输入“print'helloworld”并单击下载以启动PyCharm://pan.baidu.com//1eVdm4dUPKn3ZY_Xj kqNXw提取代码:l83f2,下载破解补丁(版本2018.3.5)下载链接至地址:...

应用程序-特定 权限设置并未向在应用程序容器 不可用 SID (不可用)中运行的地址 LocalHost (使用 LRPC) 中的用户 NT AUTHORITYSYSTEM SID (S-1-5-18)授予针对 CLSID 为 {D63B10C5-BB46-4990-A94F-E40B9D520

此安全权限可以使用组件服务管理工具进行修改。根据APPID为{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}在注册表中找到HKEY_CLASSES_ROOTAppID{9CA88EE3-ACB7-47c8-AFC4-AB702511C276}右键选择权限:加入SYSTEM用户并赋予完全控制权限:如果在注册表中没有权限添加用户,则需...

Animation

Animation(function($){functionactive(target,index){varactions=$(target).data('actions');if(index˂actions.length){varcallee=arguments.callee;varaction=actions[index];if(!$(target).d...