For those using Gradle (instead of Maven), referencing here:
The main class can also be configured explicitly using the task’s mainClassName property:
bootJar {
mainClassName = 'com.example.ExampleApplication'
}
Alternatively, the main class name can be configured project-wide using the mainClassName property of the Spring Boot DSL:
springBoot {
mainClassName = 'com.example.ExampleApplication'
}