在使用SpringCloudAlibaba全家桶进行开发的时候。
启动项目的时候发现报了个下面这个错误。
org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.1.jar:5.3.1]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.1.jar:5.3.1]
at org.springframework.context.support.DefaultLifecycleProcesso
....
解决方案
初次看到错误信息,不知道从何下手。
跟踪日志,发现多次出现了nacos的身影。
猜想可能是没有配置中心文件导致的问题。
然后试着在nacos的配置中心中,配置了对应DataId的配置文件。
然后重启下服务,发现服务居然好了。
总结只想说,问题出现的莫名其妙,解决的也莫名其妙。



