> Task :HelloWorld_Web:compileGroovy startup failed: E:\GradleDemoManyModules\ExampleHelloWorld\HelloWorld_Web\src\main\groovy\cn\dmahz\web\HelloWorldApi.groovy: 4: unable to resolve class cn.dmahz.service.HelloService @ line 4, column 1. import cn.dmahz.service.HelloService ^ E:\GradleDemoManyModules\ExampleHelloWorld\HelloWorld_Web\src\main\groovy\cn\dmahz\web\HelloWorldApi.groovy: 5: unable to resolve class cn.dmahz.service.impl.HelloServiceImpl @ line 5, column 1. import cn.dmahz.service.impl.HelloServiceImpl ^ 2 errors
在build.gradle文件里添加以下内容,即可解决问题
bootJar { enabled = false } jar { enabled = true }