Unable to start embedded Tomcat(已解决)

Unable to start embedded Tomcat(已解决)


今天在启动Springboot项目的时候遇到个奇怪问题,用idea自带的启动工具启动没问题,但是用热部署插件jrebel启动的时候就报错,具体错误如下:
先看截图
在这里插入图片描述
后面贴上一段代码:

`在这里插入代码片`Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-08-02 13:44:48.165 ERROR 14996 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
 at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:537) ~[spring-context-4.3.17.RELEASE.jar:4.3.17.RELEASE]
 at org.springframework.context.support.AbstractApplicationContext.jrLockAndRefresh(AbstractApplicationContext.java:40002) ~[spring-context-4.3.17.RELEASE.jar:4.3.17.RELEASE]
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:41008) ~[spring-context-4.3.17.RELEASE.jar:4.3.17.RELEASE]
 at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE]
 at com.company.project.Application.main(Application.java:25) [class

解决办法:
在网上找了大半天也没找到解决办法,自己也折腾了好久,明明是同样的项目,同样的操作,在别人电脑上就可以,在自己电脑上就不行,后来我冲安装了一个高版本的jdk,然后问题完美解决,这个可能就是版本问题。如果遇到类似情况的,就得考虑考虑是不是环境问题了。

咳咳---------------今天又遇到同样的问题,但是jdk比较新的版本,考虑到应该不是jdk的问题了。然后慢慢发现,看下图
点击idea的这里
点击idea的这里
然后
在这里插入图片描述
然后在这里插入图片描述

========= end =========

猜你喜欢

转载自blog.csdn.net/javaXiaoAnRan/article/details/98214525