Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使seata直接与springboot datasource挂钩 #7370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,15 @@ spring:
main:
allow-bean-definition-overriding: true
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
exclude: com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration
datasource:
dynamic:
seata: true # 开启对 seata的支持
primary: account
datasource:
account:
url: jdbc:mysql://127.0.0.1:3306/jeecg_account?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
schema: classpath:sql/schema-account.sql
url: jdbc:mysql://127.0.0.1:3306/jeecg_account?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
schema: classpath:sql/schema-account.sql
seata:
enable-auto-data-source-proxy: false
# enable-auto-data-source-proxy: false
service:
grouplist:
default: 127.0.0.1:8091
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ spring:
main:
allow-bean-definition-overriding: true
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
exclude: com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration
datasource:
dynamic:
primary: order
seata: true # 开启对 seata的支持
datasource:
# 设置 账号数据源配置
order:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/jeecg_order?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useSSL=false
username: root
password: root
schema: classpath:sql/schema-order.sql
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/jeecg_order?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useSSL=false
username: root
password: root
schema: classpath:sql/schema-order.sql
seata:
enable-auto-data-source-proxy: false
# enable-auto-data-source-proxy: false
service:
grouplist:
default: 127.0.0.1:8091
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@ spring:
name: seata-product
main:
allow-bean-definition-overriding: true
autoconfigure:
exclude: com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration
datasource:
dynamic:
primary: product
seata: true # 开启对 seata的支持
seata-mode: AT #支持XA及AT模式,默认AT
datasource:
# 设置 账号数据源配置
product:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/jeecg_product?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useSSL=false
username: root
password: root
schema: classpath:sql/schema-product.sql
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/jeecg_product?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useSSL=false
username: root
password: root
schema: classpath:sql/schema-product.sql
seata:
enable-auto-data-source-proxy: false
# enable-auto-data-source-proxy: false
service:
grouplist:
default: 127.0.0.1:8091
Expand Down