【问题标题】:While using Spring Boot 2.3.0.RELEASE parent version, SpringBootApplication class is not compiling使用 Spring Boot 2.3.0.RELEASE 父版本时,SpringBootApplication 类未编译
【发布时间】:2020-05-29 19:19:05
【问题描述】:

我正在尝试使用 Spring Boot Parent 2.3.0 和 Postgresql 开发简单的 CRUD 应用程序。

在 SpringBootApplication 类中出现以下错误,无法编译或运行项目。

- The type org.springframework.data.repository.query.QueryLookupStrategy$Key cannot be resolved. It is indirectly referenced from required .class files

- The type org.springframework.data.repository.config.BootstrapMode cannot be resolved. It is indirectly referenced from required .class files

在以前版本的 spring parent 上一切正常。此问题与 2.3.0 有关。

任何帮助表示赞赏!

【问题讨论】:

  • 你从 spring 中使用的依赖项是什么?
  • 我觉得你那里不需要父定义,starter-jpa 和 starter-web 应该就够了,要不要去掉父标签部分再重新编译?
  • 父标签管理整个spring依赖,如果他从pom中删除它,他们将不得不为每个标签使用特定的版本。

标签: java spring postgresql spring-boot spring-data-jpa


【解决方案1】:

可能是它的依赖冲突或m2目录有问题,所以你可以尝试从m2目录中删除org/springframework,然后mvn clean install,也许它会正常工作。

【讨论】:

    猜你喜欢
    • 2018-05-14
    • 1970-01-01
    • 2020-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-26
    • 2018-10-30
    相关资源
    最近更新 更多