Storms786
Storms786

Reputation: 466

Remove default spring boot welcome page

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

Answers (1)

Rajesh
Rajesh

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

More

Upvotes: 3

Related Questions