美文网首页
springboot启动报错记录

springboot启动报错记录

作者: Walk_On | 来源:发表于2018-11-07 18:03 被阅读183次

    今天部署一个开源项目IBase4j,项目一直没跑起来,总是报错

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-11-07 14:56:43.645 [main] ERROR [SpringApplication:842] - 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:155) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.ibase4j.SysServiceApplication.main(SysServiceApplication.java:13) [classes/:?] 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:204)


    从错误信息上来看tomcat出了问题,百度上说需要加入添加了@EnableAutoConfiguration注解就可以解决问题,但是试了之后还是报这个错误,于是又在网上找了小半天 才发现是idea版本的问题 我的是2017.3的版本

    pom文件

    需要去除provide这个属性 如果是2018的版本就不会出错(网上好像是这么说的)更改之后项目就可以愉快的跑起来了

    相关文章

      网友评论

          本文标题:springboot启动报错记录

          本文链接:https://www.haomeiwen.com/subject/lfovxqtx.html