20_添加slf4j的的两种方法
程序员文章站
2022-07-03 16:07:08
...
添加slf4j的的两种方法
1、代码添加:在类里添加
public class MyInterceptor implements HandlerInterceptor { private static final Logger log = LoggerFactory.getLogger(MyInterceptor.class); }
2、引入lombok依赖,注释添加:在类上添加
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency>
@Slf4j public class MyInterceptor implements HandlerInterceptor {}
下一篇: web worker