开发者社区 > 云原生 > 正文

配置seata.enabled=false后项目启动报错

问题描述

使用io.seata:seata-spring-boot-starter:1.4.2 以下是我的配置:

seata.enabled=false seata.enable-auto-data-source-proxy=true seata.data-source-proxy-mode=AT seata.tx-service-group=default seata.service.vgroup-mapping.default=default seata.service.grouplist.default=localhost:8091 seata.client.undo.log-serialization=kryo

启动项目后报错:


APPLICATION FAILED TO START


Description:

Parameter 0 of method seataAutoDataSourceProxyCreator in io.seata.spring.boot.autoconfigure.SeataDataSourceAutoConfiguration required a bean of type 'io.seata.spring.boot.autoconfigure.properties.SeataProperties' that could not be found.

Action:

Consider defining a bean of type 'io.seata.spring.boot.autoconfigure.properties.SeataProperties' in your configuration.

查看源码io.seata.spring.boot.autoconfigure.SeataDataSourceAutoConfiguration.class

发现@ConditionalOnExpression("${seata.enable:true} && ${seata.enableAutoDataSourceProxy:true} && ${seata.enable-auto-data-source-proxy:true}")

与io.seata.spring.boot.autoconfigure.properties.SeataProperties.class中的enabled属性不符

是否应将seata.enable:true替换为```seata.enabled:true``?

环境信息

JDK version : 1.8.0_271 OS : MacOS BigSur_11.1

原提问者GitHub用户fungoddd

展开
收起
学习娃 2023-06-14 17:08:41 226 0
1 条回答
写回答
取消 提交回答
  • 确实存在此问题,你可以暂时增加一列配置seata.enableAutoDataSourceProxy=false来解决,后续我们修复掉这个参数名不统一的问题

    原回答者GitHub用户a364176773

    2023-06-14 17:40:48
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
《Seata 1.3 新特性以及如何参与社区》 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载