我正在尝试在我使用IntelliJ IDEA 11开发的项目中使用Lombok.
我为IDEA安装了第三方插件,看起来工作正常,因为IDEA会看到所有自动生成的方法/字段.
所以我有一个使用Slf4j的类.我这样注释了它
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class TestClass
{
public TestClass()
{
log.info("Hello!");
}
}
Run Code Online (Sandbox Code Playgroud)
但是当我构建我的项目时,编译器吐出:cannot find symbol variable log
.
你能告诉我我在这里失踪了吗?
更新:事实证明它的RequestFactory注释过程失败了.
input files: {com.zasutki.courierApp.server.TestServlet, com.mine.courierApp.server.model.DatastoreObject}
annotations: [javax.inject.Singleton, javax.inject.Inject, lombok.Getter, lombok.Setter, com.googlecode.objectify.annotation.Id, com.googlecode.objectify.annotation.OnSave]
Processor com.google.web.bindery.requestfactory.apt.RfValidator matches [lombok.Getter, com.googlecode.objectify.annotation.Id, javax.inject.Inject, lombok.Setter, com.googlecode.objectify.annotation.OnSave, javax.inject.Singleton] and returns false.
cannot find symbol variable log
Run Code Online (Sandbox Code Playgroud)
关于变通方法的任何想法?
Update2:也许这不是读者想要听到的东西,但最终我转而使用Scala.