arVahedi
arVahedi

Reputation: 107

Difference between spring modules and spring starter modules

What is the difference between spring modules (e.g. spring-boot, spring-web and etc) and spring starter modules (e.g. spring-boot-starter, spring-web-starter and etc)?

And which one should I use?

Upvotes: 0

Views: 737

Answers (1)

Rob Scully
Rob Scully

Reputation: 790

Spring Boot Starters were built to address the issue of dependency management. Dependency management can become very complex over time and you can spend a long time managing them in your project versus focusing on issues that really matter, like your business logic and bug fixes. Spring boot starters are a set of dependency descriptors that you include in your service.

Take the MongoDB starter for instance:

https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-starters/spring-boot-starter-data-mongodb/pom.xml

It has all the dependencies you need to connect to a MongoDB instance, all you need to do is add the starter to your service pom.xml and some configuration.

Spring modules, on the other hand, are part of the core spring runtime framework. They provide the fundamental parts of the framework such as IoC and Dependency Injection.

Upvotes: 4

Related Questions