升级 Spring 数据 jpa 和 commons 导致存储库界面出现 'Could not resolve matching constructor'

Upgrading Spring data jpa and commons causes 'Could not resolve matching constructor' on repository interface

升级 Spring Data Jpa 从 1.6.5.RELEASE 到 1.7.4.RELEASE 和 Spring Data Commons 从 1.8.5.RELEASE 到 1.9.4.RELEASE, 我在启动时遇到以下错误:

BeanCreationException: Error creating bean with name 'myRepository': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)

由于 myRepository 是一个接口(扩展 JpaRepository ),因此不清楚如何为此指定构造函数 class。 我该如何解决这个问题或进一步调查?

根据 Jens Schauder 的回答,我让 spring-data-jpa 提取 spring-data-commons 的版本,而不是对其进行硬编码。它解决了我的问题。