[英]Remove default spring boot welcome page
我有一個Spring Boot Restful應用程序,但是如果我轉到以下URL:
http://localhost:8080
http://localhost:8080/profile
然后,我看到一些默認的spring boot JSON,如下所示:
{
"_links" : {
"customerEntities" : {
"href" : "http://localhost:8080/customerEntities{?page,size,sort}",
"templated" : true
},
"profile" : {
"href" : "http://localhost:8080/profile"
}
}
}
如何禁用此功能? 我不希望這些頁面消失
因為Spring HATEOAS和Spring Data JPA會自動將它們組合在一起。
這種依賴性使這些變化
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
因此,請檢查您項目的需求或刪除依賴項並檢查
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.