Intellij 14 +龙目岛:@ Slf4j找不到符号日志 [英] Intellij 14 + lombok: @Slf4j Cannot find symbol log

查看:433
本文介绍了Intellij 14 +龙目岛:@ Slf4j找不到符号日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Intellij无法识别@ SLF4J注释.我有以下错误:

Intellij doesn't recognize @SLF4J annotation. I have the following error:

Error:(105, 9) java: cannot find symbol
symbol:   variable log
location: class com.xxxxx.SdsConfig

知道我已经启用注释处理(设置->编译器->注释处理器)

knowing that I have already Enable annotation processing (Settings -> Compiler -> Annotation Processors)

我使用Java 8编译器.

I use java 8 compiler.

推荐答案

对Intellij使用lombok插件:

Use lombok plugin for Intellij:

https://plugins.jetbrains.com/plugin/6317

这将正确突出显示所有内容,并允许您对生成的方法使用自动完成功能.

This will highlight everything correctly and allow you to use auto completion for generated methods.

请注意,Intellij 14.1和更高版本支持某些功能(例如@val).

Note that some features (like @val) are supported in Intellij 14.1 and newer.

这篇关于Intellij 14 +龙目岛:@ Slf4j找不到符号日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆