Skip to content

使用 spring-boot 1.5.20 时,出异常,项目无法启动 #47

@guicw

Description

@guicw

APPLICATION FAILED TO START


Description:

An attempt was made to call the method org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy.create(Ljavax/persistence/EntityManager;Lorg/springframework/data/repository/query/QueryLookupStrategy$Key;Lorg/springframework/data/jpa/provider/QueryExtractor;Lorg/springframework/data/repository/query/EvaluationContextProvider;)Lorg/springframework/data/repository/query/QueryLookupStrategy; but it does not exist. Its class, org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy, is available from the following locations:

jar:file:/D:/maven_repo/org/springframework/data/spring-data-jpa/1.11.20.RELEASE/spring-data-jpa-1.11.20.RELEASE.jar!/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.class

It was loaded from the following location:

file:/D:/maven_repo/org/springframework/data/spring-data-jpa/1.11.20.RELEASE/spring-data-jpa-1.11.20.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy

项目中spring-boot用的1.5.20
spring-data-jpa-extra版本中2.1.1,2.1.2,2.1.21这些都试过。无法启动,上面是异常信息。
后面将项目中spring-boot降低了一个版本,才成功。
如下:

org.springframework.boot
spring-boot-starter-parent

1.5.19.RELEASE

但这只是临时之举,能否修正呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions