2017-02-03 99 views
0

我已經創建了網絡&器依賴一個簡單的啓動應用程序 ,我不能讓localhost:8080/actuator並得到了在瀏覽器中出現以下錯誤:404未找到本地主機:8080 /執行器

白色標籤錯誤此應用程序沒有明確的映射/錯誤,因此您將 視爲後備。 週五2月03 19點02分01秒CET 2017 有意外的錯誤(類型=未找到,狀態= 404)。 無

回答

1

由於Spring Boot documentation狀態信息時,/actuator端點:

提供基於超媒體「發現頁」爲其他端點。 需要Spring HATEOAS在類路徑上。

因此,您應該添加spring-boot-starter-hateoas入門套件,以使/actuator端點能夠正常工作。例如,如果你使用的搖籃:

dependencies { 
    // web and actuator and others 
    compile 'org.springframework.boot:spring-boot-starter-hateoas' 
} 

你也應該endpoints.hypermedia.enabled屬性設置爲true,作爲documentation說:

如果endpoints.hypermedia.enabled設置爲true和Spring HATEOAS 是在類路徑(例如,通過spring-boot-starter-hateoas或 如果你正在使用Spring數據REST),然後從 器的HTTP端點與超媒體鏈接增強,「發現頁面」是 添加了所有端點的鏈接。默認情況下,/actuator上的「發現頁面」爲 。

相關問題