我第一次撰寫 Web 服務時,實際上我能夠隱藏我的存盤庫,@RestResource(exported = false)但是當我使用 root uri 啟動我的服務應用程式時,http://localhost:8080/api/我仍然可以看到以下內容:

我怎樣才能從公眾視野中隱藏它?
uj5u.com熱心網友回復:
這看起來像是 Hateoas 的回應。
如果您對spring-boot-starter-hateoasor有任何依賴關系spring-hateoas,請洗掉它們。這將關閉它
如果您使用的是 spring-data-rest,那么您可能需要按以下方式設定 spring boot:
@SpringBootApplication(exclude = RepositoryRestMvcAutoConfiguration.class)
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/412294.html
標籤:
