The Gradle application plugin has supported running application as module as follows

application {
    mainClass.set("xxx")
    mainModule.set("xxx")
}

Does the SpringBoot Gradle plugin plan to add this support ? Someone may want to run bootRun task to run a module application or package the SpringBoot application using jlink

Comment From: wilkinsona

bootRun is a JavaExec subclass so you can already configure its mainModule property. Building using jlink is out of scope for Spring Boot's own plugin and should be handled by an existing Gradle jlink plugin.

Generally speaking, I think all of the pieces that you need should already be available. If there are specific things that we can do to make it easier to combine them, please feel free to make suggestions. Having said that, please also note that, other than building a custom image with jlink, it's our opinion that using the module path offers little benefit to a typical Spring Boot application.

Comment From: makhocheung

OK, get it. Thanks.