spring:
jta:
status: true
atomikos:
datasource:
xa-data-source-class-name: com.alibaba.druid.pool.xa.DruidXADataSource
xa-properties:
url : jdbc:h2:mem:core;DB_CLOSE_ON_EXIT=FALSE
username : sa
password :
max-pool-size: 20
borrow-connection-timeout: 1000
connectionfactory:
max-pool-size: 20
local-transaction-mode: true
hsweb:
datasource:
jta:
test_ds: # 数据源ID
xa-data-source-class-name: com.alibaba.druid.pool.xa.DruidXADataSource
xa-properties: # 数据源的配置属性
url: jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE
username: sa
password:
max-pool-size: 20
borrow-connection-timeout: 1000
test_ds2: # 数据源ID
xa-data-source-class-name: com.alibaba.druid.pool.xa.DruidXADataSource
xa-properties: # 数据源的配置属性
url: jdbc:mysql://localhost:3306/hsweb?pinGlobalTxToPhysicalConnection=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false
# url: jdbc:h2:mem:test2;DB_CLOSE_ON_EXIT=FALSE
username: root
password: "123456" # 纯数字密码要加上双引号,不然启动会报Cannot initialize AtomikosDataSourceBean
max-pool-size: 20
borrow-connection-timeout: 1000
init-timeout: 20