This is how to use Gradle + Spring Boot Gradle Plugin in multiple module configuration.
Gradle
Root Module
In the build.gradle on the Root Module side, Write “bootJar.enabled = false” and “jar.enabled = true”.
plugins {
id 'org.springframework.boot' version '2.0.3.RELEASE'
}
...
bootJar.enabled = false
jar.enabled = true
Sub Module
We just add the Sub Module to the dependencies without considering anything.
plugins {
id 'org.springframework.boot' version '2.0.3.RELEASE'
}
...
dependencies {
compile project(':RootModule')
}