We have a pretty large codebase developed on Spring Boot and over the course of time, we have kept adding starters as required. I am going through a bit of housekeeping and have noticed that there are quite a bit of overlap in the dependencies provided by the starters. For eg. for creating a REST API, we started out with the spring-boot-starter-web
and later added spring-boot-starter-data-rest
. But I just noticed that spring-boot-starter-web
is a direct dependency of spring-boot-starter-data-rest
.
Now I know that as a best practice, if my code is using a library directly, that library should always be a direct dependency instead of relying on another library depending on it. But Spring Boot starters are just a BOM so I am wondering if there is a better practice here.