v2
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
package com.chinaunicom.mall.ebtp.cloud.jpa.starter;
|
||||
|
||||
public interface CommonConstants {
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
String STATUS_DEL = "deleted";
|
||||
|
||||
/**
|
||||
* 正常
|
||||
*/
|
||||
String STATUS_NORMAL = "normal";
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.chinaunicom.mall.ebtp.cloud.jpa.starter;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
||||
/**
|
||||
* seata 自动装配
|
||||
*
|
||||
* @author ajaxfan
|
||||
*/
|
||||
@Configuration
|
||||
@PropertySource("classpath:seata-configuration.properties")
|
||||
public class SeataStarterConfiguration {
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
# AutoConfiguration
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.chinaunicom.mall.ebtp.cloud.jpa.starter.JpaStarterConfiguration
|
||||
com.chinaunicom.mall.ebtp.cloud.jpa.starter.JpaStarterConfiguration,\
|
||||
com.chinaunicom.mall.ebtp.cloud.jpa.starter.SeataStarterConfiguration
|
72
mall-ebtp-cloud-jpa-starter/src/main/resources/file.conf
Normal file
72
mall-ebtp-cloud-jpa-starter/src/main/resources/file.conf
Normal file
@ -0,0 +1,72 @@
|
||||
transport {
|
||||
# tcp udt unix-domain-socket
|
||||
type = "TCP"
|
||||
#NIO NATIVE
|
||||
server = "NIO"
|
||||
#enable heartbeat
|
||||
heartbeat = true
|
||||
# the client batch send request enable
|
||||
enableClientBatchSendRequest = true
|
||||
#thread factory for netty
|
||||
threadFactory {
|
||||
bossThreadPrefix = "NettyBoss"
|
||||
workerThreadPrefix = "NettyServerNIOWorker"
|
||||
serverExecutorThread-prefix = "NettyServerBizHandler"
|
||||
shareBossWorker = false
|
||||
clientSelectorThreadPrefix = "NettyClientSelector"
|
||||
clientSelectorThreadSize = 1
|
||||
clientWorkerThreadPrefix = "NettyClientWorkerThread"
|
||||
# netty boss thread size,will not be used for UDT
|
||||
bossThreadSize = 1
|
||||
#auto default pin or 8
|
||||
workerThreadSize = "default"
|
||||
}
|
||||
shutdown {
|
||||
# when destroy server, wait seconds
|
||||
wait = 3
|
||||
}
|
||||
serialization = "seata"
|
||||
compressor = "none"
|
||||
}
|
||||
|
||||
service {
|
||||
#transaction service group mapping
|
||||
vgroupMapping.biz-service-ebtp-project-service-group = "default"
|
||||
#only support when registry.type=file, please don't set multiple addresses
|
||||
default.grouplist = "10.242.31.158:18035"
|
||||
#degrade, current not support
|
||||
enableDegrade = false
|
||||
#disable seata
|
||||
disableGlobalTransaction = false
|
||||
}
|
||||
|
||||
client {
|
||||
rm {
|
||||
asyncCommitBufferLimit = 10000
|
||||
lock {
|
||||
retryInterval = 10
|
||||
retryTimes = 30
|
||||
retryPolicyBranchRollbackOnConflict = true
|
||||
}
|
||||
reportRetryCount = 5
|
||||
tableMetaCheckEnable = false
|
||||
reportSuccessEnable = false
|
||||
}
|
||||
tm {
|
||||
commitRetryCount = 5
|
||||
rollbackRetryCount = 5
|
||||
}
|
||||
undo {
|
||||
dataValidation = true
|
||||
logSerialization = "jackson"
|
||||
logTable = "undo_log"
|
||||
}
|
||||
log {
|
||||
exceptionRate = 100
|
||||
}
|
||||
support {
|
||||
spring {
|
||||
datasource-autoproxy = true
|
||||
}
|
||||
}
|
||||
}
|
@ -2,13 +2,10 @@
|
||||
mybatis-plus.configuration.map-undersore-to-camel-case=true
|
||||
# 对所有的 resultMap 都进行自动映射
|
||||
mybatis-plus.configuration.auto-mapping-behavior=full
|
||||
|
||||
# 实体扫描,多个package用逗号或者分号分隔
|
||||
mybatis-plus.typeAliasesPackage=com.chinaunicom.mall.ebtp
|
||||
|
||||
# 项目统一mapper存放位置
|
||||
mybatis-plus.mapper-locations=classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
|
||||
|
||||
# 主键类型 0: 数据库ID自增, 1: 用户输入ID, 2: 全局唯一ID(数字类型), 3: UUID;
|
||||
mybatis-plus.global-config.id-type=3
|
||||
# 机器 ID 部分
|
15
mall-ebtp-cloud-jpa-starter/src/main/resources/registry.conf
Normal file
15
mall-ebtp-cloud-jpa-starter/src/main/resources/registry.conf
Normal file
@ -0,0 +1,15 @@
|
||||
registry {
|
||||
type = "file"
|
||||
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
}
|
||||
|
||||
config {
|
||||
type = "file"
|
||||
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
seata.enabled=true
|
||||
seata.application-id=${spring.application.name}
|
||||
seata.tx-service-group=${spring.application.name}-service-group
|
||||
seata.service.grouplist.default=10.242.31.158:18035
|
Reference in New Issue
Block a user