Reputation: 466
I have a spring boot restful application but if I go to the following URLS:
http://localhost:8080
http://localhost:8080/profile
I then see some default spring boot JSON like the following:
{
"_links" : {
"customerEntities" : {
"href" : "http://localhost:8080/customerEntities{?page,size,sort}",
"templated" : true
},
"profile" : {
"href" : "http://localhost:8080/profile"
}
}
}
how can I disable this? I dont want those pages apearing
Upvotes: 1
Views: 2239
Reputation: 732
Because Spring HATEOAS and Spring Data JPA and combines them together automatically.
This dependency make these changes
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
so check this need for your your project or remove the dependency and check
Upvotes: 3