删除默认的spring boot欢迎页面

时间:2017-03-22 12:11:09

标签: java spring spring-mvc spring-boot

我有一个spring boot restful应用程序,但如果我转到以下URL:

http://localhost:8080

http://localhost:8080/profile

然后我看到一些默认的弹簧启动JSON,如下所示:

{


  "_links" : {


    "customerEntities" : {

    "href" : "http://localhost:8080/customerEntities{?page,size,sort}",
    "templated" : true
   },
  "profile" : {
     "href" : "http://localhost:8080/profile"
   }
 }
}

如何禁用此功能?我不希望那些页面出现

1 个答案:

答案 0 :(得分:1)

因为Spring HATEOAS和Spring Data JPA会自动将它们组合在一起。

此依赖关系会进行这些更改

 <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-rest</artifactId>
 </dependency> 

因此请检查您的项目需求或删除依赖项并检查

More

相关问题