unable to resolve class XXX

> 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
    }

 

   
上一篇:org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.jdt.ui was unable to load class org.ecli


下一篇:Nacos搭建并使用