即使我没有同时使用两个界面,名称也会发生冲突 [英] Name Clash even though I'm not using both interfaces
问题描述
我收到这条烦人的消息:
I'm getting this annoying message :
错误:(8,8)java:名称冲突:org.springframework.data.repository.CrudRepository中的save(java.lang.Iterable)和org.springframework.data.jpa中的save(java.lang.Iterable) .repository.JpaRepository具有相同的擦除,但是没有一个覆盖另一个
Error:(8, 8) java: name clash: save(java.lang.Iterable) in org.springframework.data.repository.CrudRepository and save(java.lang.Iterable) in org.springframework.data.jpa.repository.JpaRepository have the same erasure, yet neither overrides the other
我在代码中没有使用CrudRepository
,那么我怎么会收到这个奇怪的消息呢?我该如何解决?
I'm not using CrudRepository
in my code, so how come im getting this weird message? How can I fix it?
推荐答案
这是一个依赖性问题.以下依赖性解决了该问题
Its a dependency issue. The following dependency resolves the issue
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons-core</artifactId>
<version>**1.2.1.RELEASE**</version>
</dependency>
这篇关于即使我没有同时使用两个界面,名称也会发生冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!