There are many Maven artifacts named spring-boot-starter-*
. As the names imply, they are very useful for an application project to get started with Spring Boot.
However, after the application project become stable, should it keep using these spring-boot-starter-*
?
My concern is that doing so uses the Maven mechanism of "transitive dependencies", and it seems to violate the suggestion in Maven documentation:
Although transitive dependencies can implicitly include desired dependencies, it is a good practice to explicitly specify the dependencies you are directly using in your own source code.
For example, suppose an application project directly uses the Spring annotation @EventListener
. The annotation is in the Maven artifact spring-context
, and spring-context
is included in spring-boot-starter
. Should the application project directly specify the dependency on spring-context
after it become stable?