[Sorry, still cannot comment, so I'll post this as an answer just in case somebody else is encountering the same issue]
In my case, I forgot to include org.springframework.boot:spring-boot-starter-actuator
. When I include this as my dependency, the error is gone.