management.security.enabled=false not working

I’m, following a tutorial on Safari (Master Microservices with Spring Boot and Spring Cloud ; Learn the fundamentals of Microservices to create fault tolerant Microservices
Ranga Karanam) and in the Spring Boot appendix he uses the actuator.

Obviously things have changed. The old way doesn’t work as it’s been deprecated:

management.security.enabled=false

So I used:

management.endpoints.web.exposure.include=*

Maven dependencies for the tutorial included:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-browser</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
</dependency>

The username was user and the password was generated on the console output during startup.

http://localhost:8080/browser/index.html#http://localhost:8080/actuator

Gave me what I was looking for.

http://localhost:8080/browser/index.html#http://localhost:8080/book

Gave me my book data in JSON that was hard-coded into the @GetMapping for /book in my BooksController @RestController.

Leave a comment