E:\workspace_zwr\SolrDemo>gradle build
> Task :findMainClass
Gradle now uses separate output directories for each JVM language, but this buil
d assumes a single directory for all classes from a source set. This behaviour h
as been deprecated and is scheduled to be removed in Gradle 5.0
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':findMainClass'.
> Unable to find a single main class from the following candidates [com.solrdemo
.SolrDemoApplication, com.solrdemo.SimpleTest, com.solrdemo.bean.services.QueryB
eanDemo, com.solrdemo.bean.services.AddBeansDemo]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
解决方法:
springBoot {
mainClass = "com.solrdemo.SolrDemoApplication"
}
在build.gradle文件中加上面这句话,mainClass就是启动spring boot的那个类。