美文网首页
Spring Boot启动报错Error creating be

Spring Boot启动报错Error creating be

作者: DKing丶 | 来源:发表于2018-11-16 14:30 被阅读0次

控制台报错:


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endpointHandlerMapping' defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint@73839f22' bean method

public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()

to {[/metrics || /metrics.json],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint@73839f22' bean method

public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)    mapped.

解决办法:

经排查,是由于pom.xml文件中,spring-webmvc版本冲突导致的。

相关文章

网友评论

      本文标题:Spring Boot启动报错Error creating be

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