2017-03-22 83 views
0

我有一个春天开机宁静的应用程序,但如果我去到以下网址:删除默认春天开机欢迎页面

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" 
    } 
} 
} 

我该如何禁用此功能?我不想让这些页面变形

+0

你有依赖关系'弹簧引导启动-data-rest'?如果是这样,这种依赖性提供了这些响应。您可以删除依赖项以删除这些响应。 – dunni

回答

1

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

这种依赖使这些变化

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

所以检查这需要你对你的项目或删除的依赖,并检查

More