将spring-fox swagger升级到Open-api文档后遇到reactivetransactionmanager类的classdefnotfound错误

问题描述 投票:0回答:2

我正在尝试在 spring-boot 应用程序中从 swagger spring-fox 升级到 open-api,但遇到以下错误。

由java.lang.noclassdeffounderror org/springframework/transaction/reactivetransactionmanager引起。我尝试在 gradle 中添加实现 'org.springframework:spring-tx:5.2.4.RELEASE' 但添加后我看到 Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.support.JdbcTransactionManager 没有通过添加实现“org.springframework:spring-jdbc:5.2.4.RELEASE”来解决。有人可以建议我们如何解决这个问题吗?我正在使用以下版本

实现“org.springframework.boot:spring-boot:2.1.9.RELEASE” 实现“org.springframework.boot:spring-boot-starter-web:2.1.9.RELEASE” 实现“org.springframework.boot:spring-boot-starter-actuator:2.1.9.RELEASE” 实现 'org.springdoc:springdoc-openapi-ui:1.6.14' 实现“org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE” 实现 'org.springframework:spring-tx:5.2.4.RELEASE' 实现 'org.springframework:spring-jdbc:5.2.4.RELEASE'

spring-boot swagger springdoc-openapi-ui
2个回答
0
投票

晚安朋友,


0
投票

就我而言,添加以下依赖项可以解决问题。请使用适合的版本。

引起:java.lang.ClassNotFoundException:org.springframework.transaction.ReactiveTransactionManager

 <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>5.3.31</version>
 </dependency>
© www.soinside.com 2019 - 2024. All rights reserved.