Reputation: 395
I read a lot of posts regarding the ways to use spring-boot-starter-parent in a spring boot project. Essentially, I read posts (Spring documentation also talks about this) describing two ways to do this
I am creating a new Maven multi module project. Ideally I would like to have my own custom parent and also get all the benefits of using the Spring-boot-starter-parent. I was wondering if it made sense to create a custom parent for my maven projects. This parent would in turn be a child of the spring-boot-starter-parent. If I am not missing anything, this way I could get the benefits of having the dependency management and plugin management from spring-boot-starter-parent and at the same time have a custom parent for all my projects where I could define some other common dependencies or if needed override the dependencies defined in the spring-boot-starter-parent which would then be inherited by all my projects. Does this design make sense or am I missing something. What are the drawbacks of this approach?
Upvotes: 2
Views: 1127
Reputation: 16140
There are no drawbacks -- this is exactly what you're meant to do if you want a multimodule spring-boot project. However, consider this: typically multi-module projects have all modules versioned together, released together, and dependant on each other. This rarely makes sense in a group of spring-boot modules, which are typically of the micro-service style and which require independent evolution. So, you should question your need for a multi-module project at all.
Upvotes: 1