小编ray*_*udu的帖子

更正应用程序的类路径,使其包含单个兼容版本的 org.springframework.data.jpa.repository.config

我无法理解错误,我该怎么办?更正应用程序的类路径,使其包含单个兼容版本的 org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension.registerBeansForRoot(JpaRepositoryConfigExtension.java:169)

The following method did not exist:

    org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension.registerIfNotAlreadyRegistered(Lorg/springframework/beans/factory/support/AbstractBeanDefinition;Lorg/springframework/beans/factory/support/BeanDefinitionRegistry;Ljava/lang/String;Ljava/lang/Object;)V

The method's class, org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension, is available from the following locations:

    jar:file:/C:/Users/HCL/.m2/repository/org/springframework/data/spring-data-jpa/2.0.2.RELEASE/spring-data-jpa-2.0.2.RELEASE.jar!/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.class

It was loaded from the following location:

    file:/C:/Users/HCL/.m2/repository/org/springframework/data/spring-data-jpa/2.0.2.RELEASE/spring-data-jpa-2.0.2.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension
Run Code Online (Sandbox Code Playgroud)

我添加了最新版本的依赖项,尽管它会再次显示

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId> …
Run Code Online (Sandbox Code Playgroud)

spring-boot

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

spring-boot ×1