添加hal browser:dependency'org.springframework时出错data:spring-data-rest-hal-browser:'未找到

agxfikkp  于 2021-07-08  发布在  Java
关注(0)|答案(1)|浏览(397)

尝试使用spring boot安装hal浏览器,但出现以下错误:

  1. Dependency 'org.springframework.data:spring-data-rest-hal-browser:' not found

我想知道spring插件之间是否有官方的兼容性参考,但是无论如何,这里我默认使用了最新版本。
这是我的pom文件:

  1. ...
  2. <modelVersion>4.0.0</modelVersion>
  3. <parent>
  4. <groupId>org.springframework.boot</groupId>
  5. <artifactId>spring-boot-starter-parent</artifactId>
  6. <relativePath/> <!-- lookup parent from repository -->
  7. </parent>
  8. <groupId>com.example.ec</groupId>
  9. <artifactId>explorecali</artifactId>
  10. <version>0.0.1-SNAPSHOT</version>
  11. <name>explorecali</name>
  12. <description>Explore California MicroService</description>
  13. <properties>
  14. <java.version>15</java.version>
  15. </properties>
  16. <dependencies>
  17. <dependency>
  18. <groupId>org.springframework.boot</groupId>
  19. <artifactId>spring-boot-starter-data-jpa</artifactId>
  20. </dependency>
  21. <dependency>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter-data-rest</artifactId>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.springframework.boot</groupId>
  27. <artifactId>spring-boot-starter-web</artifactId>
  28. </dependency>
  29. <dependency>
  30. <groupId>com.h2database</groupId>
  31. <artifactId>h2</artifactId>
  32. <scope>runtime</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-starter-test</artifactId>
  37. <scope>test</scope>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.springframework.data</groupId>
  41. <artifactId>spring-data-rest-hal-browser</artifactId>
  42. </dependency>
  43. </dependencies>
  44. ...
nhjlsmyf

nhjlsmyf1#

这看起来像是一个与最新版本spring不兼容的问题,解决方案是将spring boot降级到2.3.5.0版本

  1. <parent>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-parent</artifactId>
  4. <version>2.3.5.RELEASE</version>
  5. <relativePath/> <!-- lookup parent from repository -->
  6. </parent>

相关问题