看见网上推荐的采用@Slf4j注解,可以避免每个对象都添加log的便利,于是准备尝试一把
在类定义处使用了@Slf4j注解,但是就是找不到log对象
看了下别人的方法,都是和我一样的啊
最后只能归纳与别人的IDE是Inteli J, 而我的是eclipse了
于是把lombok在eclipse上安装一下,重启eclipse再试,就马上好了
看来eclipse比商业的IDE还有些差距啊
lombok安装方法:https://projectlombok.org/features/index.html