我在endpoints.yml
档
info:
'@name@':
version: '@version@'
buildNumber: '@buildNumber@'
buildDate: '@buildDate@'
buildBranch: '@buildBranch@'
当我尝试执行时,我遇到了一个奇怪的错误:
{" errorType":" NOT_FOUND"," entity":null," message":" No message available&# 34;," fieldErrors":null}
在控制台中说
c.c.c.errors.BaseControllerAdvice - 抛出了未处理的异常,返回500 org.springframework.data.rest.webmvc.ResourceNotFoundException:找不到资源!
预期输出看起来像
{"${spring":{"application":{"name}":{"version":"@version@","buildNumber":"@buildNumber@","buildDate":"@buildDate@","buildBranch":"@buildBranch@"}}}}
可能导致此错误的原因是什么?
答案 0 :(得分:0)
我添加了Dependency以启用执行器点,以便了解项目的信息,健康状况,您需要添加的依赖项
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId></dependency>