英文:
Facing an issue "Could not find class [org.springframework.data.jdbc.repository.config.JdbcConfiguration] in spring-boot app
问题
我有一个代码库,在一台机器上运行得很好,但在另一台机器上无法运行。虽然我能够无任何问题地收集所有的依赖项,但在运行主程序时却出现了错误。
虽然我无法复制粘贴问题,因为它在RDP中,但请在下面找到堆栈跟踪。任何解决方案都将对解决此问题非常有帮助。
英文:
I have a code base which works perfectly on one of my machine but fails to run on another. While I am able to gather all dependencies without any issues I am getting error while running the main program.
While I am not able to copy paste the issue since its in RDP, please find below the stack trace. Any solutions would be of great help to resolve this issue.
答案1
得分: 1
移除 pom.xml 中与 spring-boot-starter-jpa
相关的所有其他依赖项。
仅添加以下一个依赖项即可。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.2.6.RELEASE</version> <!-- 如提到的(如果在父级别使用则可选)-->
</dependency>
就是这样。
英文:
Remove all other dependencies related to spring-boot-starter-jpa
in pom.xml.
Add only one dependency below. That's enough.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.2.6.RELEASE</version> <!-- as mentioned (but optional if used at the parent level)-->
</dependency>
That's all.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论