Card 02/ 06
Starters Example: What spring-boot-starter-web Brings In
One line in a pom.xml, and the dependency tree shows Spring MVC, Jackson and an embedded Tomcat.
mvn dependency:tree prints every library a Maven project depends on, and running it on a project with spring-boot-starter-web shows what that one line becomes. The tree below is trimmed to the starter's direct children:
spring-boot-starter-web:3.3.4
+- spring-boot-starter:3.3.4 (core Boot + auto-configuration + logging)
+- spring-boot-starter-json:3.3.4 (Jackson: databind, JSR-310, JDK8 types)
+- spring-boot-starter-tomcat:3.3.4 (embedded Tomcat)
+- spring-web:6.1.13 (HTTP client/server abstractions)
+- spring-webmvc:6.1.13 (Spring MVC itself)The starter brings in Spring MVC (Spring's web framework), Jackson (the library that converts objects to and from JSON), and an embedded Tomcat (a web server packaged as a library), plus Boot's own core with auto-configuration (Boot creating beans for you based on what is on the classpath) and logging. It brings in no database driver and no security library of any kind.
The versions line up as well: every Boot starter is at 3.3.4, and both Spring libraries at 6.1.13, the version of Spring that Boot 3.3.4 was tested with.
So a starter's job is narrow: the dependencies for one coherent piece of functionality and nothing next to it. Data access or security each needs its own starter.
← → move through sections and cards