代码:
对象:
@Data
public class Apple {
private String Color;
private int Weight;
}
测试类:
public class Demo {
public static void main(String args[]){
Apple apple = new Apple();
apple.setColor("white");
apple.setWeight(10);
System.out.println(apple.toString());
}
}
运行之后:
You aren‘t using a compiler supported by lombok, so lombok will not work and has been disabled.
java:找不到符号
在网上找了方法,搜索java找不到符号,主要的解决方案是:File-->Settings-->Compiler-->Annotation Processors 打上Enable的勾,但是还是不行,最后还是搜索了“You aren‘t using a compiler supported by lombok, so lombok will not work and has been disabled.” 提示的解决方法才可以: 指定地方输入:-Djps.track.ap.dependencies=false 即可,如下图:
写这个文章也是给自己留点经验,尽快给其他同学提供解决思路,防止时间的浪费