问题简述
pom配置如下
<properties>
<java.version>1.8</java.version>
<kafka.version>2.4.5.RELEASE</kafka.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>${kafka.version}</version>
</dependency>
</dependencies>
报错如下:
Cannot resolve org.apache.kafka:kafka-clients:2.4.5.RELEASE
原因
kafka.version 与 Kafka 源码中$kafkaVersion发生冲突
解决方案
不要采用kafka.version命名方式,例如采用<spring-kafka.version>