新增common、core
This commit is contained in:
92
uboot-core/src/main/resources/application.yml
Normal file
92
uboot-core/src/main/resources/application.yml
Normal file
@ -0,0 +1,92 @@
|
||||
server:
|
||||
port: 8080
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
spring:
|
||||
aop:
|
||||
auto: true #开启spring的aop配置
|
||||
proxy-target-class: true
|
||||
application:
|
||||
name: uboot-core
|
||||
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: mall3-ebtp-dev
|
||||
password: mall3-ebtp-dev
|
||||
url: jdbc:mysql://125.32.114.204:13306/ebtp-cloud?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
serialization:
|
||||
write-dates-as-timestamps: false
|
||||
kafka:
|
||||
bootstrap-servers: 127.0.0.1:9092
|
||||
producer:
|
||||
# 写入失败时,重试次数。当leader节点失效,一个repli节点会替代成为leader节点,此时可能出现写入失败,
|
||||
# 当retris为0时,produce不会重复。retirs重发,此时repli节点完全成为leader节点,不会产生消息丢失。
|
||||
retries: 0
|
||||
# 每次批量发送消息的数量,produce积累到一定数据,一次发送
|
||||
batch-size: 2
|
||||
# produce积累数据一次发送,缓存大小达到buffer.memory就发送数据
|
||||
buffer-memory: 33554432
|
||||
#procedure要求leader在考虑完成请求之前收到的确认数,用于控制发送记录在服务端的持久化,其值可以为如下:
|
||||
#acks = 0 如果设置为零,则生产者将不会等待来自服务器的任何确认,该记录将立即添加到套接字缓冲区并视为已发送。在这种情况下,无法保证服务器已收到记录,并且重试配置将不会生效(因为客户端通常不会知道任何故障),为每条记录返回的偏移量始终设置为-1。
|
||||
#acks = 1 这意味着leader会将记录写入其本地日志,但无需等待所有副本服务器的完全确认即可做出回应,在这种情况下,如果leader在确认记录后立即失败,但在将数据复制到所有的副本服务器之前,则记录将会丢失。
|
||||
#acks = all 这意味着leader将等待完整的同步副本集以确认记录,这保证了只要至少一个同步副本服务器仍然存活,记录就不会丢失,这是最强有力的保证,这相当于acks = -1的设置。
|
||||
#可以设置的值为:all, -1, 0, 1
|
||||
acks: 1
|
||||
key-serializer: org.apache.kafka.common.serialization.StringSerializer
|
||||
value-serializer: org.apache.kafka.common.serialization.StringSerializer
|
||||
consumer:
|
||||
group-id: user-group
|
||||
auto-offset-reset: earliest
|
||||
enable-auto-commit: true
|
||||
auto-commit-interval: 100
|
||||
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
||||
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
||||
#=========redis基础配置=========
|
||||
redis:
|
||||
lettuce:
|
||||
# jedis:
|
||||
pool:
|
||||
maxTotal: 50
|
||||
minIdle: 1
|
||||
maxWaitMillis: 5000
|
||||
maxIdle: 5
|
||||
testOnBorrow: true
|
||||
testOnReturn: true
|
||||
testWhileIdle: true
|
||||
token:
|
||||
database: 0
|
||||
host: 125.32.114.204
|
||||
port: 16379
|
||||
password: redis@CC1234
|
||||
timeout: 6000
|
||||
uuid:
|
||||
database: 1
|
||||
host: 125.32.114.204
|
||||
port: 16379
|
||||
password: redis@CC1234
|
||||
timeout: 6000
|
||||
cache:
|
||||
database: 2
|
||||
host: 125.32.114.204
|
||||
port: 16379
|
||||
password: redis@CC1234
|
||||
timeout: 6000
|
||||
thymeleaf:
|
||||
prefix: classpath:/templet/
|
||||
cache: false
|
||||
suffix: .html
|
||||
mode: LEGACYHTML5
|
||||
encoding: utf-8
|
||||
servlet:
|
||||
content-type: text/html
|
||||
|
||||
mconfig:
|
||||
swagger-ui-open: true
|
||||
exception-handle-enabled: true
|
||||
seata-open-enabled: false
|
||||
|
66
uboot-core/src/main/resources/file.conf
Normal file
66
uboot-core/src/main/resources/file.conf
Normal file
@ -0,0 +1,66 @@
|
||||
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.uboot-core-fescar-service-group = "default"
|
||||
#only support when registry.type=file, please don't set multiple addresses
|
||||
default.grouplist = "127.0.0.1:8091"
|
||||
#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
|
||||
}
|
||||
}
|
21
uboot-core/src/main/resources/seata.conf
Normal file
21
uboot-core/src/main/resources/seata.conf
Normal file
@ -0,0 +1,21 @@
|
||||
## ---------------------------------------------------------------------------
|
||||
## Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
## contributor license agreements. See the NOTICE file distributed with
|
||||
## this work for additional information regarding copyright ownership.
|
||||
## The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
## (the "License"); you may not use this file except in compliance with
|
||||
## the License. You may obtain a copy of the License at
|
||||
##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0
|
||||
##
|
||||
## Unless required by applicable law or agreed to in writing, software
|
||||
## distributed under the License is distributed on an "AS IS" BASIS,
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
## See the License for the specific language governing permissions and
|
||||
## limitations under the License.
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
client {
|
||||
application.id = uboot-core
|
||||
transaction.service.group = uboot-core-fescar-service-group
|
||||
}
|
Reference in New Issue
Block a user