config-service配置中心启动报错

来源:6-3 【注重领会】基于 Feign 实现微服务调用

蔡茶茶

2019-05-09

老师,你好,我的配置中心启动报错,不知道该怎么解决。

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at com.oicoding.configservice.ConfigserviceApplication.main(ConfigserviceApplication.java:15) [classes/:na]

写回答

1回答

张勤一

2019-05-09

同学你好:

    从异常信息来看,你使用的是 SpringBoot 的 2.1.4 版本。SpringBoot 版本是需要与 SpringCloud 版本对应的。2.1.X 版本的话,需要你的 SpringCloud 是最新的 G 版本。我觉得大概率是版本不对引起的错误。


    欢迎来 QQ 群随时交流、讨论,也非常感谢同学的支持!

1
3
蔡茶茶
找到了??尴尬
2019-05-09
共3条回复

Spring Cloud微服务架构 设计实现广告系统

广告营销系统,未来大中型企业的标配

2136 学习 · 927 问题

查看课程