2021-10-21

2021-10-21,第1张

2021-10-21

创建SpringCloud模块时报错

[ost-startStop-1] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: 
org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 
'servletEndpointRegistrar' defined in class path resource 
[org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMv
cServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception 
is org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' 
threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with 
name 'healthEndpoint' defined in class path resource 

原因:复制过来的pom文件打包方式为pom
解决方法:将打包方式由pom改为jar即可创建成功

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4672121.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-06
下一篇 2022-11-06

发表评论

登录后才能评论

评论列表(0条)

保存