first commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.mhd.common_db;
|
||||
|
||||
/**
|
||||
* 数据源代理
|
||||
*
|
||||
* @author 王子豪
|
||||
*/
|
||||
// @Configuration
|
||||
public class DataSourceConfiguration {
|
||||
|
||||
//
|
||||
// @Bean
|
||||
// @ConfigurationProperties("spring.datasource")
|
||||
// public DataSource druidDataSource() {
|
||||
// return new DruidDataSource();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 设置代理数据源
|
||||
// *
|
||||
// * @param druidDataSource
|
||||
// * @return
|
||||
// */
|
||||
// @Primary // 设置首选数据源
|
||||
// @Bean("datasource")
|
||||
// public DataSourceProxy dataSource(DataSource druidDataSource) {
|
||||
// return new DataSourceProxy(druidDataSource);
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#spring.cloud.alibaba.seata.tx-service-group=my_test_tx_group
|
||||
#logging.level.seata=debug
|
||||
# spring\u914D\u7F6E
|
||||
# spring\u914D\u7F6E
|
||||
spring:
|
||||
name: mhd-common-db
|
||||
seata:
|
||||
tx-service-group: default_tx_group
|
||||
service:
|
||||
# 事务组对应的集群民称
|
||||
vgroup-mapping.default_tx_group: seata-server
|
||||
# seata-server的地址
|
||||
grouplist.seata-server: 192.168.10.18:8091
|
||||
# grouplist.seata-server: 8.130.64.92:8091
|
||||
enabled: true
|
||||
@@ -0,0 +1,33 @@
|
||||
registry {
|
||||
# file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
|
||||
type = "nacos"
|
||||
|
||||
nacos {
|
||||
application = "seata-server"
|
||||
serverAddr = "192.168.0.166:8848"
|
||||
group = "SEATA_GROUP"
|
||||
namespace = ""
|
||||
cluster = "default"
|
||||
username = "nacos"
|
||||
password = "manhuoda@2023"
|
||||
}
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
}
|
||||
|
||||
config {
|
||||
# file、nacos 、apollo、zk、consul、etcd3
|
||||
type = "nacos"
|
||||
|
||||
nacos {
|
||||
serverAddr = "192.168.0.166:8848"
|
||||
namespace = ""
|
||||
group = "SEATA_GROUP"
|
||||
username = "nacos"
|
||||
password = "manhuoda@2023"
|
||||
}
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user