The best answer for multi-module projects would be https://github.com/gradle/gradle/issues/12789#issuecomment-612638399
quote: I don’t think this is a gradle bug (I’m not a maintainer also).
You are applying the spring boot plugin at root level by doing.
Since you are doing this, the spring boot project expects that your root project is a sb app requiring a mainClassName For the bootJar.
You should only apply the spring boot project to the projects that are SB apps. In this case, your products-service.
The fact that you disable bootJar in the root project is a smell that shouldn’t be applied there.