1、 背景
学习springcloud时,启动消费者服务时报错
LF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
2、 错误原因
pom文件中没有添加springboot test依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.5.6</version>
<scope>test</scope>
</dependency>
3、 解决办法
添加springboot test 启动依赖