Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Spring Boot Starters just for dependency management?

Well, I was seeing Spring IO Platform for versioned management of my dependencies, then I went into the sources, as far I see it uses Spring Boot POMs under the hoods. So after that I was wondering, can I use the starters, since it's just POMs to shortcut the dependency declaration ?

like image 254
Joao Evangelista Avatar asked Dec 31 '25 09:12

Joao Evangelista


1 Answers

Yes, you can use the starters.

Because I just want the poms, not the autoconfigure from Boot
Then do not use @EnableAutoConfiguration, see JavaDoc and Reference.

Because I just want the poms, not the embedded servlet container
Then do not use the spring-boot-starter-web starter, see the list of Starter POMs.

If you need Spring MVC, then you have to declare the dependency or you use spring-boot-starter-web but without Tomcat, see e.g. spring boot war without tomcat embedded

like image 175
ChrLipp Avatar answered Jan 03 '26 05:01

ChrLipp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!