If you are not using boot repackaging, you can simply turn off tasks bootRepackageby adding this line to the build.gradle file:
bootRepackage.enabled = false
Otherwise, you need to specify the main class:
bootRepackage {
mainClass = 'youPackage.Application'
}
You will find more detailed information in this link.
Share your build.gradle if you still have problems.
source
share