项目有很多与 Spring 数据 JPA 相关的错误,这些错误根本不会消失

Project has many errors related to Spring data JPA, and these errors won't go at all

我的项目中有很多错误,它们不会消失,我知道它们与依赖项相关的东西有关,但我很困惑。如果您也面临同样的问题,有人可以告诉我如何解决这个问题吗?

在您的 XML 中试试这个:

我们使用 JPA 命名空间来实现基于 XML 的启用,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:jpa="http://www.springframework.org/schema/data/jpa"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
    https://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/data/jpa
    https://www.springframework.org/schema/data/jpa/spring-jpa.xsd">

  <jpa:repositories base-package="path.to.repository.package" />

</beans>