当前位置:网站首页>成功解决之idea引用Lombok的@Slf4j后无法正常使用log
成功解决之idea引用Lombok的@Slf4j后无法正常使用log
2022-06-26 18:10:00 【JobsTribe】
lombok引用的jar包
代码中要引用lombok中的@Slf4j,相关的依赖:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
报错内容
代码:
@Service
@Slf4j
public class AsyncServiceDemo {
@Async
public void testAsyncService(){
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
log.error("e",e);
}
}
}
但是在代码中写log时,一直引入不了:
解决办法
没有下载插件Lombok
引用Lombok时,需要有Lombok的插件。
在File-Setting-Plugins-Marketplace中搜索Lombok后下载下来,然后重启idea后就可以正常使用了。
边栏推荐
- JS 常用正则表达式
- 无需人工先验!港大&同济&LunarAI&旷视提出基于语义分组的自监督视觉表征学习,显著提升目标检测、实例分割和语义分割任务!
- IDEA收藏代码、快速打开favorites收藏窗口
- Applet setting button sharing function
- Bayesian network explanation
- Connected to surface test questions
- In and exceptions, count (*) query optimization
- Padding percentage operation
- 股票开账户如何优惠开户?现在在线开户安全么?
- 数据加密标准DES安全性
猜你喜欢

The cross compilation environment appears So link file not found problem

决策树与随机森林

JVM入個門(1)

让torch.cuda.is_available()从false变成true的一点经验

RSA concept explanation and tool recommendation - LMN

JVM入个门(1)

transforms. The input of randomcrop() can only be PIL image, not tensor

行锁与隔离级别案例分析

(multi threading knowledge points that must be mastered) understand threads, create threads, common methods and properties of using threads, and the meaning of thread state and state transition

IDEA收藏代码、快速打开favorites收藏窗口
随机推荐
Static registration and dynamic registration of JNI
PC端录制扫515地机器人/scan数据
将字符串B插入字符串A,有多少种插入办法可以使新串是一个回文串
Bayesian network explanation
sqlite数据库的系统表sqlite_master
Crawl Douban to read top250 and import it into SqList database (or excel table)
Deep understanding of MySQL lock and transaction isolation level
Binary search-2
A little experience of next (ITER (dataloader))
[QNX] Command
JVM入個門(1)
Do you know how to compare two objects
非对称密码体制详解
Introduction to Ethereum Technology Architecture
【QNX】命令
Ethereum技术架构介绍
vutils. make_ A little experience of grid () in relation to black and white images
数据加密标准DES安全性
[unity] use C in unity to execute external files, such as Exe or bat
Idea collection code, quickly open favorites collection window