See: introduction to spring boot (3) – spring boot starter Maven template
Recently, the number of software dependency libraries is increasing exponentially. These dependency libraries introduce other dependencies. Dependency management itself has become a very complex task. A large-scale project often needs a large number of technical experts to complete dependency management. If you want to use some popular libraries in the project, the introduction of string boot starter template can bring a lot of convenience, which can help us ensure that the correct dependencies are used in the project, and reduce the complexity of dependency management.
Spring boot has more than 50 different starter templates, integrating a variety of popular frameworks, such as relational or NoSQL database connection, web services, social network integration, monitoring library, logging, template rendering. Moreover, more and more new integration libraries have been introduced into spring boot, and the list of supported integration libraries has been increasing.
How does the starter template work?
Spring boot starter is a maven template that contains a collection of all the dependencies required to start a specific function. Each starter has a special file（ pom.xml ）Contains a list of dependencies provided by spring.
These dependencies can be found in the pom.xml Found in the file. For example, the POM file for spring boot starter data JPA starter can be found on GitHub.
We can see the dependency introduced by the POM file, so the introduction of spring boot starter data JPA in project construction will introduce spring ORM, hibernate entity manager and spring data JPA at the same time. These libraries provide basic support for writing JPA / Dao code.
Before spring boot starter data JPA 2.2. X, Maven was used for build management, so the corresponding configuration file is this pom.xml 。 From 2.3. X to gradle, the corresponding configuration file is builde.gradle 。
When the project needs to add new features, it is recommended to check the existing spring boot starter template to see if the ready-made starter can be used directly. Spring boot community has been constantly adding new starter templates, and the range of functions it supports has been growing. People with lofty ideals can also contribute to the new starter template supported by spring boot.
Popular tempate and its dependencies
The following table lists some frequently used spring starters and their dependencies for reference only:
For the latest starter dependencies, please refer to the dependency configuration file under each module of GitHub starters（ build.gradle )。