How to hide /profile Endpoint in Spring Boot
First time I'm writing a Webservice and really I was able to hide my repositories with @RestResource(exported = false)
but when I start my Service Application with the root uri like: http://localhost:8080/api/
I can still see the following:
How can I hide this from public view?
Solution 1:
This looks like Hateoas response.
If you have any dependency for spring-boot-starter-hateoas
or spring-hateoas
, please remove them. This shall turn it off
If you are using spring-data-rest, then you may need to set spring boot as following:
@SpringBootApplication(exclude = RepositoryRestMvcAutoConfiguration.class)