-
在项目中引入rabbitMq消息队列时,查看引入的表提示 slf4j包有冲突,引入不了 spring-rabbit jar
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
-
通过exclusions 去除冲突jar 还是报错 引入不了spring-rabbit jar
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
-
引入的新包放在了最下面报的这个错
-
想了下是不是放在最前面就不冲突了,试了下正常引入了…
<dependencies>
<!-- rabbitMq引入 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>