spring-boot - 将 spring-data-commons 与 spring-boot-2.1.x 一起使用时的包问题
问题描述
我正在将 Spring Boot 从 1.5.12 迁移到 2.1.14。我们使用 Gradle 作为构建工具,因此作为 Spring Boot 迁移的一部分,我们必须将 Gradle 从 3.x 更改为 4.x,并尝试根据需要更新 build.gradle。迁移后,CRUDRepository 相关 API 中会显示错误。
我们正在使用 spring-boot-starter-data-jpa 和 spring-data-commons
迁移前:
- spring-boot-starter-data-jpa - 1.5.12(从 Spring Boot 版本获取)
- spring-data-commons (1.13.12.RELEASE)
显示 org.springframework.data.repository 包没有错误
迁移后:
- spring-boot-starter-data-jpa - 2.1.14(从 Spring Boot 版本获取)
- spring-data-commons (2.0.7.RELEASE)
错误:org.springframework.data.repository。未解决
如果我将 spring-data-common-1.13.12.RELEASE 与 spring-boot-2.x 一起使用,则会出现以下错误。
原因:找不到 org.springframework.data.repository.config.BootstrapMode 的类文件
有人可以提出一些建议来解决这个问题。
提前致谢
解决方案
推荐阅读
- flutter - Flutter 消息应用程序 - 禁用图标按钮
- google-apps-script - Google 幻灯片中的页面和幻灯片有什么区别?
- react-admin - 无法进行身份验证,在生产中未经授权
- python - 使用 boto3 创建 AWS Lambda 函数
- python - 如何使用 Pandas 获取数据透视表中行标题的行号?
- python-3.x - Python 无法执行 powershell 脚本
- html - 为什么我的 CSS 动画只有在开发工具中选择元素时才有效?
- matlab - 我可以在 for 循环中使用 GlobalSearch 来优化 Matlab 中的参数范围吗?
- python - Sklearn Predict_Proba: ValueError: 操作数不能与形状一起广播 (44,57) (4,)
- python - 检查一个列表中有多少元素包含在第二个列表中,包括重复项