Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring Commons和Spring数据jpa一起导入时失败_Java_Spring_Maven_Spring Boot_Spring Data Jpa - Fatal编程技术网

Java Spring Commons和Spring数据jpa一起导入时失败

Java Spring Commons和Spring数据jpa一起导入时失败,java,spring,maven,spring-boot,spring-data-jpa,Java,Spring,Maven,Spring Boot,Spring Data Jpa,我目前正在使用SpringBoot后端,我的任务是更新所有依赖项并确保它在Java11中运行 我遇到了一个异常,并发现使用maven导入Spring数据共享解决了缺少的pageableCustomizer()方法 org.springframework.data 我的maven pom。问题可能是对发布序列版本的依赖 这个发布序列已经有几年的历史了。您需要了解为什么pom中包含了该功能。根据发行说明,Spring Boot 2.1应该已经与Java 11兼容()。一般来说,您应该坚持使用S

我目前正在使用SpringBoot后端,我的任务是更新所有依赖项并确保它在Java11中运行

我遇到了一个异常,并发现使用maven导入Spring数据共享解决了缺少的
pageableCustomizer()
方法


org.springframework.data


我的maven pom。

问题可能是对发布序列版本的依赖


这个发布序列已经有几年的历史了。您需要了解为什么pom中包含了该功能。

根据发行说明,Spring Boot 2.1应该已经与Java 11兼容()。一般来说,您应该坚持使用SpringBoot提供的启动器。没错,但是这个项目比SpringBootStarter要大得多。目前的项目不适用于Java 11和最新版本,它需要数据jpa和数据共享。您的问题片段中有一些错误。org.springframework.boot:springbootstarter数据jpa:2.1.7.RELEASE取决于org.springframework.data:spring数据jpa:2.1.7.RELEASE(不是您所展示的1.8.2.RELEASE)。请发布您的
依赖项:tree
@guido我添加了请求的信息,但不得不更改一些包名。我还添加了我目前正在尝试的内容。您需要共享您的maven pom-spring boot starter数据jpa pom和spring data commons pom引用了预期的依赖关系:并且依赖关系树中的版本与Fowler-SR2发行系列中的版本相匹配,但是,
stoffel父对象
pom可能以我看不到的其他方式影响依赖关系。这就是我问题的答案。它现在在Java11上运行。我添加了releasetrain,这是因为我在谷歌搜索一个错误时发现了一个答案,该错误是由新java版本在修复另一个版本时无意中添加了一个新错误引起的。谢谢你给了我这个简单的解决办法,我当然可以找到,但没有找到
***************************
APPLICATION FAILED TO START
***************************

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.postProcess(JpaRepositoryConfigExtension.java:120)

The following method did not exist:

    org.springframework.data.repository.config.RepositoryConfigurationSource.getAttribute(Ljava/lang/String;)Ljava/lang/String;

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

    jar:file:path_to_project/target/name_of_the_jar.jar!/BOOT-INF/lib/spring-data-commons-2.1.10.RELEASE.jar!/org/springframework/data/repository/config/RepositoryConfigurationSource.class

It was loaded from the following location:

    jar:file:/path_to_project/target/name_of_the_jar.jar!/BOOT-INF/lib/spring-data-commons-2.1.10.RELEASE.jar!/


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.data.repository.config.RepositoryConfigurationSource
+ org.springframework.boot:spring-boot-starter-data-jpa:2.1.7.RELEASE
  +  org.springframework.data:spring-data-jpa:1.8.2.RELEASE
    + org.springframework.data:spring-data-commons:1.10.2.RELEASE