kotlin - 使用 Spring Data Neo4j 的 Spring Web Flux 项目是否有事务支持(TransactionalOperator)?
问题描述
我尝试TransactionalOperator
在以下组件中使用:
@Component
class OrganisationHandler(
private val repository: OrganisationRepository,
private val operator: TransactionalOperator
) { ... }
启动应用程序会导致以下错误:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of constructor in com.keen.backend.organisation.OrganisationHandler required a bean of type 'org.springframework.transaction.reactive.TransactionalOperator' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'transactionalOperator' in 'TransactionAutoConfiguration' not loaded because @ConditionalOnSingleCandidate (types: org.springframework.transaction.ReactiveTransactionManager; SearchStrategy: all) did not find any beans
Action:
Consider revisiting the entries above or defining a bean of type 'org.springframework.transaction.reactive.TransactionalOperator' in your configuration.
我将此文档用作参考。我还偶然发现了一年前的这篇博文。似乎没有任何 SDN 实现AbstractReactiveTransactionManager
可以与TransactionalOperator#create(ReactiveTransactionManager)
. 我也找不到有关该功能的任何相关票证。
在 Web Flux 环境中是否有解决方法或可能有不同的方法来处理 SDN 的事务?
解决方案
推荐阅读
- python - 从 1 个元组中减去 3 个列表
- angular - Angularfire2 更新记录
- c++ - 无法删除结构指针内的指针数组(c ++)
- shell - 如何通过脚本显示“文件属性页面”
- android - Android:共享元素 - 返回过渡不起作用
- javascript - 使用 jQuery 随机引用
- bash - 将局部变量传递给远程 shell bash 脚本
- c# - 数据存储查询数组
- android - android写入共享首选项获取java.io.IOException:写入失败:ENOSPC(设备上没有剩余空间)
- xamarin - Fody.WeavingTask 和 SolutionDir 的 Xamarin 问题