8f0eb5d7 by 肖初晴

初始化

0 parents
1 HELP.md
2 target/
3 #!.mvn/wrapper/maven-wrapper.jar
4 !**/src/main/**/target/
5 !**/src/test/**/target/
6 .mvn
7 src/test
8 src/main/resources/application-dev.yml
9 src/main/resources/bootstrap-dev.yml
10
11 ### STS ###
12 .apt_generated
13 .classpath
14 .factorypath
15 .project
16 .settings
17 .springBeans
18 .sts4-cache
19
20 ### IntelliJ IDEA ###
21 .idea
22 *.iws
23 *.iml
24 *.ipr
25
26 ### NetBeans ###
27 /nbproject/private/
28 /nbbuild/
29 /dist/
30 /nbdist/
31 /.nb-gradle/
32 build/
33 !**/src/main/**/build/
34 !**/src/test/**/build/
35
36 ### VS Code ###
37 .vscode/
1 ARG BASE_IMAGE_URL
2 FROM $BASE_IMAGE_URL/csbr/java:openjdk-17-jdk-alpine
3 VOLUME /tmp
4 ARG CE=$CE
5 ARG PROMETHEUS_PARAMS=$PROMETHEUS_PARAMS
6 ARG SKYWALKING_PARAMS=$SKYWALKING_PARAMS
7 ENV CE=$CE
8 ENV PROMETHEUS_PARAMS=$PROMETHEUS_PARAMS
9 ENV SKYWALKING_PARAMS=$SKYWALKING_PARAMS
10 ENV TZ=Asia/Shanghai
11 #ARG JAR_FILE
12 #COPY ${JAR_FILE} mscrm.jar
13 #RUN bash -c 'touch /mscrm.jar'
14 ADD target/ms-data-circulation-portal-service.jar ms-data-circulation-portal-service.jar
15 # 指定容器内的时区
16 RUN echo "Asia/Shanghai" > /etc/timezone
17 ENV CE=$CE
18 #ENV JAVA_OPTS=$JAVA_OPTS
19 EXPOSE 19210
20 RUN echo "当前Docker环境:$CE" && echo "当前监控参数:$PROMETHEUS_PARAMS"
21 ENTRYPOINT ["sh", "-c","java -Xms256m -Xmx1024m $PROMETHEUS_PARAMS $SKYWALKING_PARAMS -Djava.security.egd=file:/dev/./urandom -jar /ms-data-circulation-portal-service.jar --spring.cloud.config.profile=$CE"]
...\ No newline at end of file ...\ No newline at end of file
1 pipeline {
2 agent any
3 parameters{
4 choice(
5 description: '你需要选择哪个环境部署?',
6 name: 'deploy_env',
7 choices: ['heart-pre-release','heart-test']
8 )
9 }
10 //环境定义
11 environment{
12 //日志映射路径
13 LOG_PATH = "/mnt/log/"
14 //服务名称
15 SVN_FOLD = readMavenPom().getArtifactId()
16 SSH_PATH = "csbr5.3"
17 //镜像版本号
18 image_tag = readMavenPom().getVersion()
19 //docker私服ip
20 ip = "192.168.5.4:82"
21 //微服务端口号
22 port = "9199"
23 }
24 //定时任务
25 //triggers { pollSCM('H 4/* 0 0 1-5') }
26 //triggers {
27 //每天凌晨2点自动构建
28 // cron('H 2 * * *')
29 //}
30 options {
31 // 设置保留的最大历史构建数为6
32 buildDiscarder(logRotator(numToKeepStr: '2'))
33 }
34 //全局定义工具
35 tools {
36 //工具名称必须在Jenkins 管理Jenkins → 全局工具配置中预配置。
37 maven 'maven3'
38 jdk 'JDK17'
39 }
40 stages {
41 stage('heart-pre-release'){
42 when{
43 expression{return params.deploy_env=='heart-pre-release'}
44 }
45 steps{
46 script{
47 env.SVN_TYPE = "pre-release"
48 }
49 }
50 }
51 stage('heart-test'){
52 when{
53 expression{return params.deploy_env=='heart-test'}
54 }
55 steps{
56 script{
57 env.SVN_TYPE = "test"
58 }
59 }
60 }
61
62 //构建
63 stage('Maven Build') {
64 steps {
65 //sh './gradlew build'
66 //执行shell命令
67 sh 'echo ${JAVA_HOMOE}'
68 sh "mvn -f ./pom.xml clean package -Dmaven.test.skip=true -X -P${params.deploy_env}"
69 //sh 'mvn -f ${SVN_FOLD}/pom.xml clean package'
70 }
71 }
72 stage('Docker Build') {
73 steps {
74 //分分支构建
75 script{
76 //develop分支环境
77 echo 'start to deploy ${SVN_FOLD} on test ...'
78 sh '''
79 CID=$(docker ps -a | grep "${SVN_FOLD}" | awk '{print $1}')
80 IID=$(docker images | grep "none" | awk '{print $3}')
81 cp "$WORKSPACE"/target/"${SVN_FOLD}".jar "$WORKSPACE"
82 if [ -n "$IID" ]; then
83 echo "存在'${SVN_FOLD}'镜像,IID='$IID'"
84 cd "$WORKSPACE"
85 ##构建镜像到远程仓库
86 docker login "${ip}" -u admin -p E6w611g864wQ2
87 docker build -t "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}" .
88 docker push "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}"
89 else
90 echo "不存在'${SVN_FOLD}'镜像,开始构建镜像"
91 ##构建镜像到远程仓库
92 docker login "${ip}" -u admin -p E6w611g864wQ2
93 docker build -t "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}" .
94 docker push "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}"
95 fi
96 '''
97 echo 'Depoly ${SVN_FOLD} develop success ...'
98
99 }
100 }
101 }
102 //部署
103 stage('Deploy') {
104 steps {
105 echo 'Deploying'
106 //分分支部署
107 script{
108 //develop分支环境
109 echo 'start to deploy ${SVN_FOLD} on test ...'
110 //调用Publish Over SSH插件,上传docker-compose.yaml文件并且执行deploy脚本
111 sshPublisher(publishers: [sshPublisherDesc(configName: "$SSH_PATH", transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: """
112 echo "日志路径 '$LOG_PATH''$SVN_FOLD'"
113 #使用k8s构建
114 kubectl delete -f /mnt/k8s/${params.deploy_env}/ms-data-circulation-portal-service.yaml
115 kubectl apply -f /mnt/k8s/${params.deploy_env}/ms-data-circulation-portal-service.yaml
116 """, execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/mnt/csbr/data', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/*.*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
117 echo 'Depoly ${SVN_FOLD} success ...'
118
119 }
120 //sh './build.sh'
121 }
122 }
123 }
124 //归档
125 post {
126 always {
127 echo 'Archive artifacts'
128 archiveArtifacts artifacts: "**/target/*.jar", excludes: "**/target"
129 }
130 }
131 }
...\ No newline at end of file ...\ No newline at end of file
File mode changed
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4 <modelVersion>4.0.0</modelVersion>
5 <parent>
6 <groupId>org.springframework.boot</groupId>
7 <artifactId>spring-boot-starter-parent</artifactId>
8 <version>3.1.5</version>
9 <relativePath/>
10 </parent>
11 <groupId>com.csbr.qingcloud.portal</groupId>
12 <artifactId>ms-data-circulation-portal-service</artifactId>
13 <version>0.0.1-SNAPSHOT</version>
14 <name>ms-data-circulation-portal-service</name>
15
16 <properties>
17 <log4j2.version>2.15.0</log4j2.version>
18 <cabr-package.version>1.0.5-daop</cabr-package.version>
19 <!--docker镜像前缀-->
20 <docker.image.prefix>springio</docker.image.prefix>
21 </properties>
22
23 <dependencies>
24 <dependency>
25 <groupId>com.csbr.qingcloud</groupId>
26 <artifactId>csbr-cloud-common</artifactId>
27 <version>${cabr-package.version}</version>
28 </dependency>
29 <dependency>
30 <groupId>com.csbr.qingcloud</groupId>
31 <artifactId>csbr-cloud-workflow</artifactId>
32 <version>${cabr-package.version}</version>
33 </dependency>
34 <dependency>
35 <groupId>com.csbr.qingcloud</groupId>
36 <artifactId>csbr-cloud-base</artifactId>
37 <version>${cabr-package.version}</version>
38 </dependency>
39 <dependency>
40 <groupId>com.csbr.qingcloud</groupId>
41 <artifactId>csbr-cloud-log</artifactId>
42 <version>${cabr-package.version}</version>
43 </dependency>
44 <dependency>
45 <groupId>com.csbr.qingcloud</groupId>
46 <artifactId>csbr-cloud-mybatis</artifactId>
47 <version>${cabr-package.version}</version>
48 </dependency>
49 <dependency>
50 <groupId>com.csbr.qingcloud</groupId>
51 <artifactId>csbr-cloud-swagger</artifactId>
52 <version>${cabr-package.version}</version>
53 </dependency>
54 <dependency>
55 <groupId>org.springframework.boot</groupId>
56 <artifactId>spring-boot-starter-undertow</artifactId>
57 </dependency>
58 <dependency>
59 <groupId>org.springframework.boot</groupId>
60 <artifactId>spring-boot-starter-web</artifactId>
61 </dependency>
62 <dependency>
63 <groupId>org.apache.httpcomponents</groupId>
64 <artifactId>httpcore</artifactId>
65 <version>4.4.9</version>
66 </dependency>
67 <dependency>
68 <groupId>org.apache.httpcomponents</groupId>
69 <artifactId>httpclient</artifactId>
70 <version>4.5.13</version>
71 </dependency>
72 <dependency>
73 <groupId>org.apache.httpcomponents</groupId>
74 <artifactId>httpmime</artifactId>
75 <version>4.5.12</version>
76 </dependency>
77 </dependencies>
78
79 <build>
80 <finalName>ms-data-circulation-portal-service</finalName>
81 <plugins>
82 <plugin>
83 <groupId>org.springframework.boot</groupId>
84 <artifactId>spring-boot-maven-plugin</artifactId>
85 </plugin>
86 </plugins>
87 <resources>
88 <resource><!--此处的设置是打包的时候排除不相关的目录-->
89 <directory>src/main/resources</directory>
90 <!--此处设置为上面在resources目录下创建的文件夹-->
91 <excludes>
92 <exclude>release/*</exclude>
93 <exclude>develop/*</exclude>
94 <exclude>release-test/*</exclude>
95 </excludes>
96 <!--开启过滤器,此处不能忽略!-->
97 <filtering>true</filtering>
98 </resource>
99 <resource>
100 <directory>src/main/resources/${profileActive}/${subPath}</directory>
101 </resource>
102 </resources>
103 </build>
104 <profiles>
105 <profile>
106 <id>develop-daop-master</id>
107 <properties>
108 <profileActive>develop</profileActive>
109 <subPath></subPath>
110 </properties>
111 </profile>
112 <profile>
113 <id>develop-daop-lt</id>
114 <properties>
115 <profileActive>develop</profileActive>
116 <subPath>lt</subPath>
117 </properties>
118 </profile>
119 <profile>
120 <id>develop-daop-zcgl</id>
121 <properties>
122 <profileActive>develop</profileActive>
123 <subPath>zcgl</subPath>
124 </properties>
125 </profile>
126 <profile>
127 <id>develop-daop-jgjf</id>
128 <properties>
129 <profileActive>develop</profileActive>
130 <subPath>jgjf</subPath>
131 </properties>
132 </profile>
133 <profile>
134 <id>develop-daop-project</id>
135 <properties>
136 <profileActive>develop</profileActive>
137 <subPath>project</subPath>
138 </properties>
139 </profile>
140 <profile>
141 <id>release-test-daop-master</id>
142 <properties>
143 <profileActive>release-test</profileActive>
144 <subPath></subPath>
145 </properties>
146 </profile>
147 <profile>
148 <id>release-test-daop-lt</id>
149 <properties>
150 <profileActive>release-test</profileActive>
151 <subPath>lt</subPath>
152 </properties>
153 </profile>
154 <profile>
155 <id>release-test-daop-zcgl</id>
156 <properties>
157 <profileActive>release-test</profileActive>
158 <subPath>zcgl</subPath>
159 </properties>
160 </profile>
161 <profile>
162 <id>release-test-daop-jgjf</id>
163 <properties>
164 <profileActive>release-test</profileActive>
165 <subPath>jgjf</subPath>
166 </properties>
167 </profile>
168 <profile>
169 <id>release-test-daop-project</id>
170 <properties>
171 <profileActive>release-test</profileActive>
172 <subPath>project</subPath>
173 </properties>
174 </profile>
175 <profile>
176 <id>production-daop-master</id>
177 <properties>
178 <profileActive>release</profileActive>
179 <subPath></subPath>
180 </properties>
181 </profile>
182 <profile>
183 <id>production-daop-lt</id>
184 <properties>
185 <profileActive>release</profileActive>
186 <subPath>lt</subPath>
187 </properties>
188 </profile>
189 <profile>
190 <id>production-daop-zcgl</id>
191 <properties>
192 <profileActive>release</profileActive>
193 <subPath>zcgl</subPath>
194 </properties>
195 </profile>
196 <profile>
197 <id>production-daop-jgjf</id>
198 <properties>
199 <profileActive>release</profileActive>
200 <subPath>jgjf</subPath>
201 </properties>
202 </profile>
203 <profile>
204 <id>production-daop-project</id>
205 <properties>
206 <profileActive>release</profileActive>
207 <subPath>project</subPath>
208 </properties>
209 </profile>
210 </profiles>
211
212 </project>
1 package com.csbr.qingcloud.portal;
2
3 import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
4 import lombok.extern.slf4j.Slf4j;
5 import org.mybatis.spring.annotation.MapperScan;
6 import org.springframework.boot.SpringApplication;
7 import org.springframework.boot.autoconfigure.SpringBootApplication;
8 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
9 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
10 import org.springframework.cloud.context.config.annotation.RefreshScope;
11 import org.springframework.cloud.openfeign.EnableFeignClients;
12 import org.springframework.context.annotation.ComponentScan;
13 import org.springframework.scheduling.annotation.EnableScheduling;
14 import org.springframework.web.bind.annotation.RestController;
15
16 /**
17 * @author XiaoCQ
18 * @description: 门户服务
19 * @since 2024-12-17
20 **/
21 @SpringBootApplication(exclude ={DataSourceAutoConfiguration.class} )
22 @MapperScan(basePackages = {"com.csbr.qingcloud.portal.mybatis.mapper", "com.csbr.cloud.mybatis.mapper"})
23 @ComponentScan({"com.csbr.qingcloud.portal.*","com.csbr.cloud.common.*","com.csbr.cloud.mybatis.service.*", "com.csbr.cloud.mybatis.*"})
24 @EnableFeignClients(basePackages = {"com.csbr.cloud.*.feign", "com.csbr.qingcloud.portal.feign"})
25 @RefreshScope
26 @EnableDiscoveryClient
27 @Slf4j
28 @EnableScheduling
29 @RestController
30 @EnableAutoDataSourceProxy
31 public class MsServiceApplication {
32
33 public static void main(String[] args) {
34 System.setProperty("nacos.logging.default.config.enabled","false");
35 SpringApplication.run(MsServiceApplication.class, args);
36 log.info("[========================>>>>>>>>>>>>>>服务已启动<<<<<<<<<<<<<<========================]");
37 }
38
39 }
1 server:
2 port: 19210
3 monitor:
4 log-white:
5 #服务全局名称
6 spring:
7 application:
8 name: ms-data-circulation-portal-service
9 jackson:
10 time-zone: Asia/Shanghai
11 cloud:
12 inetutils:
13 ignored-interfaces: docker0 # 让应用忽略docker0网卡
14 compatibility-verifier:
15 enabled: false
16 gateway:
17 gatewayServiceName: gateway-server
18 host: 114.115.131.96
19 kafka:
20 bootstrap-servers: kafka-cs-develop.daop:9092
21 producer:
22 retries: 3
23 main:
24 allow-bean-definition-overriding: true
25 datasource:
26 sql-script-encoding: utf-8
27 #type: org.apache.commons.dbcp2.BasicDataSource
28 #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
29 dynamic:
30 primary: master
31 druid:
32 initial-size: 0
33 max-active: 50
34 min-idle: 2
35 max-wait: -1
36 min-evictable-idle-time-millis: 30000
37 max-evictable-idle-time-millis: 30000
38 time-between-eviction-runs-millis: 0
39 validation-query: select 1
40 validation-query-timeout: -1
41 test-on-borrow: false
42 test-on-return: false
43 test-while-idle: true
44 pool-prepared-statements: true
45 # max-open-prepared-statements: 100
46 filters: stat,wall
47 share-prepared-statements: true
48 wall:
49 config:
50 condition-double-const-allow: true
51 condition-and-alway-true-allow: true
52 ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
53 datasource:
54 master:
55 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
56 username: prg
57 password: E5t391s349wT@3
58 driver-class-name: com.mysql.cj.jdbc.Driver
59 druid:
60 initial-size: 5
61 slave:
62 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
63 username: prg
64 password: E5t391s349wT@3
65 driver-class-name: com.mysql.cj.jdbc.Driver
66 druid:
67 initial-size: 5
68 # redis配置
69 data:
70 redis:
71 # 集群
72 #cluster:
73 # nodes: redis-service.redis:6379
74 # 单节点
75 host: redis-service.daop
76 port: 6379
77 password: "J7e411m693cA9"
78 timeout: 1000
79 prefix: daop-develop
80 jedis:
81 pool:
82 max-idle: 8
83 max-wait: 2000
84 min-idle: 0
85 max-active: 100
86 test-on-borrow: true
87 test-while-idle: true
88 sql:
89 init:
90 schema-locations: classpath*:init.sql
91 encoding: UTF-8
92 mode: never
93 redisson:
94 address: redis://redis-service.daop:6379
95 password: "J7e411m693cA9"
96
97 seata:
98 enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
99 tx-service-group: my_test_tx_group
100 application-id: ms-data-circulation-portal-service
101 registry:
102 type: nacos
103 nacos:
104 application: seata-server
105 cluster: seata-cluster
106 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
107 password: U9u457p155vH@8
108 username: nacos
109 namespace: daop-master
110 group: develop
111 service:
112 vgroupMapping:
113 my_test_tx_group: seata-cluster
114 grouplist:
115 default: ms-daop-seata-service-develop:8091
116
117 #数据库字段开启驼峰
118 mybatis:
119 configuration:
120 map-underscore-to-camel-case: true
121 callSettersOnNulls: true
122 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
123 mybatis-plus:
124 global-config:
125 db-config:
126 id-type: ASSIGN_UUID
127 logic-delete-value: "null"
128 logic-not-delete-value: N
129 mapper-locations: classpath*:mapper/**/*Mapper.xml
130 type-aliases-package: com.csbr.qingcloud.configure.mybatis
131 ##生产环境屏蔽此配置 优化性能
132 configuration:
133 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134 pagehelper:
135 helperDialect: mysql
136 reasonable: true
137 supportMethodsArguments: true
138 params: count=countSql
139
140 csbr:
141 kafka:
142 topic-prefix: DAOP-DEVELOP
143 consumer:
144 # 开启kafka消费者
145 enable: true
146 # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
147 # bootstrap-servers: 210.12.100.201:9092
148 bootstrap-servers: kafka-cs-develop.daop:9092
149 # bootstrap-servers: 192.168.3.120:9092
150 # 是否启用自动提交 offset
151 enable-auto-commit: false
152 # 自动提交间隔时间(MS),仅在自动提交开启时有效
153 auto-commit-interval: 100
154 # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
155 auto-offset-reset: latest
156 # 消息 key 的反序列化方法
157 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
158 # 消息 value 的反序列化方法
159 value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
160 # listener 开启的线程数
161 concurrency: 2
162 # session 超时时间
163 session-timeout: 60000
164 # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
165 max-poll-interval: 10000
166 # 最大 poll 消息数量
167 max-poll-records: 2
168 producer:
169 # 开启kafka生产者
170 enable: true
171 # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
172 # bootstrap-servers: 210.12.100.201:9092
173 bootstrap-servers: kafka-cs-develop.daop:9092
174 # bootstrap-servers: 192.168.3.120:9092
175 # 失败后的重发次数
176 retries: 0
177 # 一次最多发送的数据量
178 batch-size: 4096
179 # 32M批处理缓冲区
180 buffer-memory: 33554432
181 # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
182 linger: 1
183 feign:
184 hystrix:
185 enabled: false
186
187 query-limit:
188 white: TrTaskValid
189
190
1 spring:
2 application:
3 name: ms-data-circulation-portal-service
4 cloud:
5 nacos:
6 #配置中心
7 config:
8 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
9 file-extension: yaml
10 group: develop
11 namespace: daop-master
12 # 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新(auto-refresh、enable-remote-sync-config两者缺一不可)
13 auto-refresh: true
14 # 允许nacos服务端向本地同步配置
15 enable-remote-sync-config: true
16 #注册中心
17 discovery:
18 enabled: true
19 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
20 ip: 192.168.6.20
21 group: develop
22 namespace: daop-master
23 metadata:
24 code: "006"
25 user:
26 name: nacos
27 password: nacos
28 management:
29 context-path: /actuator
30 #接口限流
31 sentinel:
32 transport:
33 # port: 7777
34 dashboard: sentinel-service.nacos-cluster:8858
35 #取消懒加载
36 eager: true
37 management:
38 endpoint:
39 health:
40 show-details: always
41 endpoints:
42 web:
43 exposure:
44 include: '*'
45 ###暂时禁用rabbit的健康检查
46 health:
47 rabbit:
48 enabled: false
49 sentinel:
50 enabled: false
51 feign:
52 sentinel:
53 enabled: true
...\ No newline at end of file ...\ No newline at end of file
1 server:
2 port: 19210
3 monitor:
4 log-white:
5 #服务全局名称
6 spring:
7 application:
8 name: ms-data-circulation-portal-service
9 jackson:
10 time-zone: Asia/Shanghai
11 cloud:
12 inetutils:
13 ignored-interfaces: docker0 # 让应用忽略docker0网卡
14 compatibility-verifier:
15 enabled: false
16 gateway:
17 gatewayServiceName: gateway-server
18 host: 114.115.131.96
19 kafka:
20 bootstrap-servers: kafka-cs-develop.daop:9092
21 producer:
22 retries: 3
23 main:
24 allow-bean-definition-overriding: true
25 datasource:
26 sql-script-encoding: utf-8
27 #type: org.apache.commons.dbcp2.BasicDataSource
28 #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
29 dynamic:
30 primary: master
31 druid:
32 initial-size: 0
33 max-active: 50
34 min-idle: 2
35 max-wait: -1
36 min-evictable-idle-time-millis: 30000
37 max-evictable-idle-time-millis: 30000
38 time-between-eviction-runs-millis: 0
39 validation-query: select 1
40 validation-query-timeout: -1
41 test-on-borrow: false
42 test-on-return: false
43 test-while-idle: true
44 pool-prepared-statements: true
45 # max-open-prepared-statements: 100
46 filters: stat,wall
47 share-prepared-statements: true
48 wall:
49 config:
50 condition-double-const-allow: true
51 condition-and-alway-true-allow: true
52 ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
53 datasource:
54 master:
55 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
56 username: prg
57 password: E5t391s349wT@3
58 driver-class-name: com.mysql.cj.jdbc.Driver
59 druid:
60 initial-size: 5
61 slave:
62 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
63 username: prg
64 password: E5t391s349wT@3
65 driver-class-name: com.mysql.cj.jdbc.Driver
66 druid:
67 initial-size: 5
68 # redis配置
69 data:
70 redis:
71 # 集群
72 #cluster:
73 # nodes: redis-service.redis:6379
74 # 单节点
75 host: redis-service.daop
76 port: 6379
77 password: "J7e411m693cA9"
78 timeout: 1000
79 prefix: daop-develop
80 jedis:
81 pool:
82 max-idle: 8
83 max-wait: 2000
84 min-idle: 0
85 max-active: 100
86 test-on-borrow: true
87 test-while-idle: true
88 sql:
89 init:
90 schema-locations: classpath*:init.sql
91 encoding: UTF-8
92 mode: never
93 redisson:
94 address: redis://redis-service.daop:6379
95 password: "J7e411m693cA9"
96
97 seata:
98 enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
99 tx-service-group: my_test_tx_group
100 application-id: ms-data-circulation-portal-service
101 registry:
102 type: nacos
103 nacos:
104 application: seata-server
105 cluster: seata-cluster
106 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
107 password: U9u457p155vH@8
108 username: nacos
109 namespace: daop-lt
110 group: develop
111 service:
112 vgroupMapping:
113 my_test_tx_group: seata-cluster
114 grouplist:
115 default: ms-daop-seata-service-develop:8091
116
117 #数据库字段开启驼峰
118 mybatis:
119 configuration:
120 map-underscore-to-camel-case: true
121 callSettersOnNulls: true
122 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
123 mybatis-plus:
124 global-config:
125 db-config:
126 id-type: ASSIGN_UUID
127 logic-delete-value: "null"
128 logic-not-delete-value: N
129 mapper-locations: classpath*:mapper/**/*Mapper.xml
130 type-aliases-package: com.csbr.qingcloud.configure.mybatis
131 ##生产环境屏蔽此配置 优化性能
132 configuration:
133 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134 pagehelper:
135 helperDialect: mysql
136 reasonable: true
137 supportMethodsArguments: true
138 params: count=countSql
139
140 csbr:
141 kafka:
142 topic-prefix: DAOP-LT-DEVELOP
143 consumer:
144 # 开启kafka消费者
145 enable: true
146 # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
147 # bootstrap-servers: 210.12.100.201:9092
148 bootstrap-servers: kafka-cs-develop.daop:9092
149 # bootstrap-servers: 192.168.3.120:9092
150 # 是否启用自动提交 offset
151 enable-auto-commit: false
152 # 自动提交间隔时间(MS),仅在自动提交开启时有效
153 auto-commit-interval: 100
154 # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
155 auto-offset-reset: latest
156 # 消息 key 的反序列化方法
157 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
158 # 消息 value 的反序列化方法
159 value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
160 # listener 开启的线程数
161 concurrency: 2
162 # session 超时时间
163 session-timeout: 60000
164 # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
165 max-poll-interval: 10000
166 # 最大 poll 消息数量
167 max-poll-records: 2
168 producer:
169 # 开启kafka生产者
170 enable: true
171 # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
172 # bootstrap-servers: 210.12.100.201:9092
173 bootstrap-servers: kafka-cs-develop.daop:9092
174 # bootstrap-servers: 192.168.3.120:9092
175 # 失败后的重发次数
176 retries: 0
177 # 一次最多发送的数据量
178 batch-size: 4096
179 # 32M批处理缓冲区
180 buffer-memory: 33554432
181 # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
182 linger: 1
183 feign:
184 hystrix:
185 enabled: false
186
187 query-limit:
188 white: TrTaskValid
189
1 spring:
2 application:
3 name: ms-data-circulation-portal-service
4 cloud:
5 nacos:
6 #配置中心
7 config:
8 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
9 file-extension: yaml
10 group: develop
11 namespace: daop-lt
12 # 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新(auto-refresh、enable-remote-sync-config两者缺一不可)
13 auto-refresh: true
14 # 允许nacos服务端向本地同步配置
15 enable-remote-sync-config: true
16 #注册中心
17 discovery:
18 enabled: true
19 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
20 ip: 192.168.6.20
21 port: 19207
22 group: develop
23 namespace: daop-lt
24 metadata:
25 code: "006"
26 user:
27 name: nacos
28 password: nacos
29 management:
30 context-path: /actuator
31 #接口限流
32 sentinel:
33 transport:
34 # port: 7777
35 dashboard: sentinel-service.nacos-cluster:8858
36 #取消懒加载
37 eager: true
38 management:
39 endpoint:
40 health:
41 show-details: always
42 endpoints:
43 web:
44 exposure:
45 include: '*'
46 ###暂时禁用rabbit的健康检查
47 health:
48 rabbit:
49 enabled: false
50 sentinel:
51 enabled: false
52 feign:
53 sentinel:
54 enabled: true
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <configuration>
3 <!-- 本地服务的名称 -->
4 <springProperty scope="context" name="app_name" source="spring.application.name"/>
5 <contextName>${app_name}</contextName>
6 <!-- 包含 logback 的基础配置,路径就是所在包 -->
7 <include resource="com/csbr/cloud/common/logback/logback-base.xml"/>
8 <!-- 增加skywalking配置日志收集-->
9 <appender name="grpc-log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
10 <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
11 <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout">
12 <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern>
13 </layout>
14 </encoder>
15 </appender>
16 <!-- 控制打印输出的内容 -->
17 <root level="INFO">
18 <appender-ref ref="FILE_ERROR"/>
19 <!-- <appender-ref ref="FILE_WARN"/>-->
20 <appender-ref ref="FILE_INFO"/>
21 <!-- 控制台 输出-->
22 <appender-ref ref="STDOUT"/>
23 <appender-ref ref="grpc-log"/>
24 </root>
25
26 <springProperty scope="context" name="kafka_server" source="spring.kafka.bootstrap-servers" />
27 <springProperty scope="context" name="topci_prefix" source="csbr.kafka.topic-prefix" />
28
29 <!-- 输出到Kafka -->
30 <appender name="kafkaAppender" class="com.csbr.cloud.common.logback.KafkaAppender">
31 <bootstrapServers>${kafka_server}</bootstrapServers>
32 <topic>csbr_fbt_log</topic>
33 <prefix>${topci_prefix}</prefix>
34 <formatter class="com.csbr.cloud.common.logback.JsonFormatter">
35 <expectJson>false</expectJson>
36 </formatter>
37 </appender>
38
39 <logger name="com.csbr.cloud.common.exception.GlobalExceptionHandler" level="ERROR" additivity="true">
40 <appender-ref ref="kafkaAppender"></appender-ref>
41 </logger>
42 </configuration>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <configuration>
3 <!-- 本地服务的名称 -->
4 <property name="app_name" value="ms-data-circulation-portal-service"/>
5 <!-- 包含 logback 的基础配置,路径就是所在包 -->
6 <include resource="com/csbr/cloud/common/logback/logback-base.xml"/>
7 <!-- 控制打印输出的内容 -->
8 <root level="INFO">
9 <appender-ref ref="FILE_ERROR"/>
10 <!-- <appender-ref ref="FILE_WARN"/>-->
11 <appender-ref ref="FILE_INFO"/>
12 <!-- 控制台 输出-->
13 <appender-ref ref="STDOUT"/>
14 </root>
15 <logger name="org.apache.kafka.clients.NetworkClient" level="Error" />
16 </configuration>
...\ No newline at end of file ...\ No newline at end of file
1 server:
2 port: 19210
3 monitor:
4 log-white:
5 #服务全局名称
6 spring:
7 application:
8 name: ms-data-circulation-portal-service
9 jackson:
10 time-zone: Asia/Shanghai
11 cloud:
12 inetutils:
13 ignored-interfaces: docker0 # 让应用忽略docker0网卡
14 compatibility-verifier:
15 enabled: false
16 gateway:
17 gatewayServiceName: gateway-server
18 host: 114.115.131.96
19 kafka:
20 bootstrap-servers: kafka-cs-develop.daop:9092
21 producer:
22 retries: 3
23 main:
24 allow-bean-definition-overriding: true
25 datasource:
26 sql-script-encoding: utf-8
27 #type: org.apache.commons.dbcp2.BasicDataSource
28 #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
29 dynamic:
30 primary: master
31 druid:
32 initial-size: 0
33 max-active: 50
34 min-idle: 2
35 max-wait: -1
36 min-evictable-idle-time-millis: 30000
37 max-evictable-idle-time-millis: 30000
38 time-between-eviction-runs-millis: 0
39 validation-query: select 1
40 validation-query-timeout: -1
41 test-on-borrow: false
42 test-on-return: false
43 test-while-idle: true
44 pool-prepared-statements: true
45 # max-open-prepared-statements: 100
46 filters: stat,wall
47 share-prepared-statements: true
48 wall:
49 config:
50 condition-double-const-allow: true
51 condition-and-alway-true-allow: true
52 ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
53 datasource:
54 master:
55 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
56 username: prg
57 password: E5t391s349wT@3
58 driver-class-name: com.mysql.cj.jdbc.Driver
59 druid:
60 initial-size: 5
61 slave:
62 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
63 username: prg
64 password: E5t391s349wT@3
65 driver-class-name: com.mysql.cj.jdbc.Driver
66 druid:
67 initial-size: 5
68 # redis配置
69 data:
70 redis:
71 # 集群
72 #cluster:
73 # nodes: redis-service.redis:6379
74 # 单节点
75 host: redis-service.daop
76 port: 6379
77 password: "J7e411m693cA9"
78 timeout: 1000
79 prefix: daop-test
80 jedis:
81 pool:
82 max-idle: 8
83 max-wait: 2000
84 min-idle: 0
85 max-active: 100
86 test-on-borrow: true
87 test-while-idle: true
88 sql:
89 init:
90 schema-locations: classpath*:init.sql
91 encoding: UTF-8
92 mode: never
93 redisson:
94 address: redis://redis-service.daop:6379
95 password: "J7e411m693cA9"
96
97 seata:
98 enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
99 tx-service-group: my_test_tx_group
100 application-id: ms-data-circulation-portal-service
101 registry:
102 type: nacos
103 nacos:
104 application: seata-server
105 cluster: seata-cluster
106 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
107 password: U9u457p155vH@8
108 username: nacos
109 namespace: daop-master
110 group: test
111 service:
112 vgroupMapping:
113 my_test_tx_group: seata-cluster
114 grouplist:
115 default: ms-daop-seata-service-develop:8091
116
117 #数据库字段开启驼峰
118 mybatis:
119 configuration:
120 map-underscore-to-camel-case: true
121 callSettersOnNulls: true
122 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
123 mybatis-plus:
124 global-config:
125 db-config:
126 id-type: ASSIGN_UUID
127 logic-delete-value: "null"
128 logic-not-delete-value: N
129 mapper-locations: classpath*:mapper/**/*Mapper.xml
130 type-aliases-package: com.csbr.qingcloud.configure.mybatis
131 ##生产环境屏蔽此配置 优化性能
132 configuration:
133 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134 pagehelper:
135 helperDialect: mysql
136 reasonable: true
137 supportMethodsArguments: true
138 params: count=countSql
139
140 csbr:
141 kafka:
142 topic-prefix: DAOP-TEST
143 consumer:
144 # 开启kafka消费者
145 enable: true
146 # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
147 # bootstrap-servers: 210.12.100.201:9092
148 bootstrap-servers: kafka-cs-develop.daop:9092
149 # bootstrap-servers: 192.168.3.120:9092
150 # 是否启用自动提交 offset
151 enable-auto-commit: false
152 # 自动提交间隔时间(MS),仅在自动提交开启时有效
153 auto-commit-interval: 100
154 # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
155 auto-offset-reset: latest
156 # 消息 key 的反序列化方法
157 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
158 # 消息 value 的反序列化方法
159 value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
160 # listener 开启的线程数
161 concurrency: 2
162 # session 超时时间
163 session-timeout: 60000
164 # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
165 max-poll-interval: 10000
166 # 最大 poll 消息数量
167 max-poll-records: 2
168 producer:
169 # 开启kafka生产者
170 enable: true
171 # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
172 # bootstrap-servers: 210.12.100.201:9092
173 bootstrap-servers: kafka-cs-develop.daop:9092
174 # bootstrap-servers: 192.168.3.120:9092
175 # 失败后的重发次数
176 retries: 0
177 # 一次最多发送的数据量
178 batch-size: 4096
179 # 32M批处理缓冲区
180 buffer-memory: 33554432
181 # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
182 linger: 1
183 feign:
184 hystrix:
185 enabled: false
186
187 query-limit:
188 white: TrTaskValid
189
1 spring:
2 application:
3 name: ms-data-circulation-portal-service
4 cloud:
5 nacos:
6 #配置中心
7 config:
8 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
9 file-extension: yaml
10 group: test
11 namespace: daop-master
12 # 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新(auto-refresh、enable-remote-sync-config两者缺一不可)
13 auto-refresh: true
14 # 允许nacos服务端向本地同步配置
15 enable-remote-sync-config: true
16 #注册中心
17 discovery:
18 enabled: true
19 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
20 group: test
21 namespace: daop-master
22 metadata:
23 code: "006"
24 user:
25 name: nacos
26 password: nacos
27 management:
28 context-path: /actuator
29 #接口限流
30 sentinel:
31 transport:
32 # port: 7777
33 dashboard: sentinel-service.nacos-cluster:8858
34 #取消懒加载
35 eager: true
36 management:
37 endpoint:
38 health:
39 show-details: always
40 endpoints:
41 web:
42 exposure:
43 include: '*'
44 ###暂时禁用rabbit的健康检查
45 health:
46 rabbit:
47 enabled: false
48 sentinel:
49 enabled: false
50 feign:
51 sentinel:
52 enabled: true
...\ No newline at end of file ...\ No newline at end of file
1 server:
2 port: 19210
3 monitor:
4 log-white:
5 #服务全局名称
6 spring:
7 application:
8 name: ms-data-circulation-portal-service
9 jackson:
10 time-zone: Asia/Shanghai
11 cloud:
12 inetutils:
13 ignored-interfaces: docker0 # 让应用忽略docker0网卡
14 compatibility-verifier:
15 enabled: false
16 gateway:
17 gatewayServiceName: gateway-server
18 host: 114.115.131.96
19 kafka:
20 bootstrap-servers: kafka-cs-develop.daop:9092
21 producer:
22 retries: 3
23 main:
24 allow-bean-definition-overriding: true
25 datasource:
26 sql-script-encoding: utf-8
27 #type: org.apache.commons.dbcp2.BasicDataSource
28 #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
29 dynamic:
30 primary: master
31 druid:
32 initial-size: 0
33 max-active: 50
34 min-idle: 2
35 max-wait: -1
36 min-evictable-idle-time-millis: 30000
37 max-evictable-idle-time-millis: 30000
38 time-between-eviction-runs-millis: 0
39 validation-query: select 1
40 validation-query-timeout: -1
41 test-on-borrow: false
42 test-on-return: false
43 test-while-idle: true
44 pool-prepared-statements: true
45 # max-open-prepared-statements: 100
46 filters: stat,wall
47 share-prepared-statements: true
48 wall:
49 config:
50 condition-double-const-allow: true
51 condition-and-alway-true-allow: true
52 ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
53 datasource:
54 master:
55 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
56 username: prg
57 password: E5t391s349wT@3
58 driver-class-name: com.mysql.cj.jdbc.Driver
59 druid:
60 initial-size: 5
61 slave:
62 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
63 username: prg
64 password: E5t391s349wT@3
65 driver-class-name: com.mysql.cj.jdbc.Driver
66 druid:
67 initial-size: 5
68 # redis配置
69 data:
70 redis:
71 # 集群
72 #cluster:
73 # nodes: redis-service.redis:6379
74 # 单节点
75 host: redis-service.daop
76 port: 6379
77 password: "J7e411m693cA9"
78 timeout: 1000
79 prefix: daop-test
80 jedis:
81 pool:
82 max-idle: 8
83 max-wait: 2000
84 min-idle: 0
85 max-active: 100
86 test-on-borrow: true
87 test-while-idle: true
88 sql:
89 init:
90 schema-locations: classpath*:init.sql
91 encoding: UTF-8
92 mode: never
93 redisson:
94 address: redis://redis-service.daop:6379
95 password: "J7e411m693cA9"
96
97 seata:
98 enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
99 tx-service-group: my_test_tx_group
100 application-id: ms-data-circulation-portal-service
101 registry:
102 type: nacos
103 nacos:
104 application: seata-server
105 cluster: seata-cluster
106 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
107 password: U9u457p155vH@8
108 username: nacos
109 namespace: daop-lt
110 group: test
111 service:
112 vgroupMapping:
113 my_test_tx_group: seata-cluster
114 grouplist:
115 default: ms-daop-seata-service-test:8091
116
117 #数据库字段开启驼峰
118 mybatis:
119 configuration:
120 map-underscore-to-camel-case: true
121 callSettersOnNulls: true
122 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
123 mybatis-plus:
124 global-config:
125 db-config:
126 id-type: ASSIGN_UUID
127 logic-delete-value: "null"
128 logic-not-delete-value: N
129 mapper-locations: classpath*:mapper/**/*Mapper.xml
130 type-aliases-package: com.csbr.qingcloud.configure.mybatis
131 ##生产环境屏蔽此配置 优化性能
132 configuration:
133 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134 pagehelper:
135 helperDialect: mysql
136 reasonable: true
137 supportMethodsArguments: true
138 params: count=countSql
139
140 csbr:
141 kafka:
142 topic-prefix: DAOP-LT-TEST
143 consumer:
144 # 开启kafka消费者
145 enable: true
146 # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
147 # bootstrap-servers: 210.12.100.201:9092
148 bootstrap-servers: kafka-cs-develop.daop:9092
149 # bootstrap-servers: 192.168.3.120:9092
150 # 是否启用自动提交 offset
151 enable-auto-commit: false
152 # 自动提交间隔时间(MS),仅在自动提交开启时有效
153 auto-commit-interval: 100
154 # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
155 auto-offset-reset: latest
156 # 消息 key 的反序列化方法
157 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
158 # 消息 value 的反序列化方法
159 value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
160 # listener 开启的线程数
161 concurrency: 2
162 # session 超时时间
163 session-timeout: 60000
164 # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
165 max-poll-interval: 10000
166 # 最大 poll 消息数量
167 max-poll-records: 2
168 producer:
169 # 开启kafka生产者
170 enable: true
171 # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
172 # bootstrap-servers: 210.12.100.201:9092
173 bootstrap-servers: kafka-cs-develop.daop:9092
174 # bootstrap-servers: 192.168.3.120:9092
175 # 失败后的重发次数
176 retries: 0
177 # 一次最多发送的数据量
178 batch-size: 4096
179 # 32M批处理缓冲区
180 buffer-memory: 33554432
181 # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
182 linger: 1
183 feign:
184 hystrix:
185 enabled: false
186
187 query-limit:
188 white: TrTaskValid
189
1 spring:
2 application:
3 name: ms-data-circulation-portal-service
4 cloud:
5 nacos:
6 #配置中心
7 config:
8 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
9 file-extension: yaml
10 group: test
11 namespace: daop-lt
12 # 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新(auto-refresh、enable-remote-sync-config两者缺一不可)
13 auto-refresh: true
14 # 允许nacos服务端向本地同步配置
15 enable-remote-sync-config: true
16 #注册中心
17 discovery:
18 enabled: true
19 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
20 group: test
21 namespace: daop-lt
22 metadata:
23 code: "006"
24 user:
25 name: nacos
26 password: nacos
27 management:
28 context-path: /actuator
29 #接口限流
30 sentinel:
31 transport:
32 # port: 7777
33 dashboard: sentinel-service.nacos-cluster:8858
34 #取消懒加载
35 eager: true
36 management:
37 endpoint:
38 health:
39 show-details: always
40 endpoints:
41 web:
42 exposure:
43 include: '*'
44 ###暂时禁用rabbit的健康检查
45 health:
46 rabbit:
47 enabled: false
48 sentinel:
49 enabled: false
50 feign:
51 sentinel:
52 enabled: true
...\ No newline at end of file ...\ No newline at end of file
1 server:
2 port: 19210
3 monitor:
4 log-white:
5 #服务全局名称
6 spring:
7 application:
8 name: ms-data-circulation-portal-service
9 jackson:
10 time-zone: Asia/Shanghai
11 cloud:
12 inetutils:
13 ignored-interfaces: docker0 # 让应用忽略docker0网卡
14 compatibility-verifier:
15 enabled: false
16 gateway:
17 gatewayServiceName: gateway-server
18 host: 114.115.131.96
19 kafka:
20 bootstrap-servers: kafka-cs-develop.daop:9092
21 producer:
22 retries: 3
23 main:
24 allow-bean-definition-overriding: true
25 datasource:
26 sql-script-encoding: utf-8
27 #type: org.apache.commons.dbcp2.BasicDataSource
28 #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
29 dynamic:
30 primary: master
31 druid:
32 initial-size: 0
33 max-active: 50
34 min-idle: 2
35 max-wait: -1
36 min-evictable-idle-time-millis: 30000
37 max-evictable-idle-time-millis: 30000
38 time-between-eviction-runs-millis: 0
39 validation-query: select 1
40 validation-query-timeout: -1
41 test-on-borrow: false
42 test-on-return: false
43 test-while-idle: true
44 pool-prepared-statements: true
45 # max-open-prepared-statements: 100
46 filters: stat,wall
47 share-prepared-statements: true
48 wall:
49 config:
50 condition-double-const-allow: true
51 condition-and-alway-true-allow: true
52 ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
53 datasource:
54 master:
55 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
56 username: prg
57 password: E5t391s349wT@3
58 driver-class-name: com.mysql.cj.jdbc.Driver
59 druid:
60 initial-size: 5
61 slave:
62 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
63 username: prg
64 password: E5t391s349wT@3
65 driver-class-name: com.mysql.cj.jdbc.Driver
66 druid:
67 initial-size: 5
68 # redis配置
69 data:
70 redis:
71 # 集群
72 #cluster:
73 # nodes: redis-service.redis:6379
74 # 单节点
75 host: redis-service.daop
76 port: 6379
77 password: "J7e411m693cA9"
78 timeout: 1000
79 prefix: daop-release
80 jedis:
81 pool:
82 max-idle: 8
83 max-wait: 2000
84 min-idle: 0
85 max-active: 100
86 test-on-borrow: true
87 test-while-idle: true
88 sql:
89 init:
90 schema-locations: classpath*:init.sql
91 encoding: UTF-8
92 mode: never
93 redisson:
94 address: redis://redis-service.daop:6379
95 password: "J7e411m693cA9"
96
97 seata:
98 enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
99 tx-service-group: my_test_tx_group
100 application-id: ms-data-circulation-portal-service
101 registry:
102 type: nacos
103 nacos:
104 application: seata-server
105 cluster: seata-cluster
106 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
107 password: U9u457p155vH@8
108 username: nacos
109 namespace: daop-master
110 group: release
111 service:
112 vgroupMapping:
113 my_test_tx_group: seata-cluster
114 grouplist:
115 default: ms-daop-seata-service-release:8091
116
117 #数据库字段开启驼峰
118 mybatis:
119 configuration:
120 map-underscore-to-camel-case: true
121 callSettersOnNulls: true
122 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
123 mybatis-plus:
124 global-config:
125 db-config:
126 id-type: ASSIGN_UUID
127 logic-delete-value: "null"
128 logic-not-delete-value: N
129 mapper-locations: classpath*:mapper/**/*Mapper.xml
130 type-aliases-package: com.csbr.qingcloud.configure.mybatis
131 ##生产环境屏蔽此配置 优化性能
132 configuration:
133 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134 pagehelper:
135 helperDialect: mysql
136 reasonable: true
137 supportMethodsArguments: true
138 params: count=countSql
139
140 csbr:
141 kafka:
142 topic-prefix: DAOP-RELEASE
143 consumer:
144 # 开启kafka消费者
145 enable: true
146 # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
147 # bootstrap-servers: 210.12.100.201:9092
148 bootstrap-servers: kafka-cs-develop.daop:9092
149 # bootstrap-servers: 192.168.3.120:9092
150 # 是否启用自动提交 offset
151 enable-auto-commit: false
152 # 自动提交间隔时间(MS),仅在自动提交开启时有效
153 auto-commit-interval: 100
154 # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
155 auto-offset-reset: latest
156 # 消息 key 的反序列化方法
157 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
158 # 消息 value 的反序列化方法
159 value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
160 # listener 开启的线程数
161 concurrency: 2
162 # session 超时时间
163 session-timeout: 60000
164 # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
165 max-poll-interval: 10000
166 # 最大 poll 消息数量
167 max-poll-records: 2
168 producer:
169 # 开启kafka生产者
170 enable: true
171 # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
172 # bootstrap-servers: 210.12.100.201:9092
173 bootstrap-servers: kafka-cs-develop.daop:9092
174 # bootstrap-servers: 192.168.3.120:9092
175 # 失败后的重发次数
176 retries: 0
177 # 一次最多发送的数据量
178 batch-size: 4096
179 # 32M批处理缓冲区
180 buffer-memory: 33554432
181 # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
182 linger: 1
183 feign:
184 hystrix:
185 enabled: false
186
187 query-limit:
188 white: TrTaskValid
189
1 spring:
2 application:
3 name: ms-data-circulation-portal-service
4 cloud:
5 nacos:
6 #配置中心
7 config:
8 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
9 file-extension: yaml
10 group: release
11 namespace: daop-master
12 # 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新(auto-refresh、enable-remote-sync-config两者缺一不可)
13 auto-refresh: true
14 # 允许nacos服务端向本地同步配置
15 enable-remote-sync-config: true
16 #注册中心
17 discovery:
18 enabled: true
19 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
20 group: release
21 namespace: daop-master
22 metadata:
23 code: "006"
24 user:
25 name: nacos
26 password: nacos
27 management:
28 context-path: /actuator
29 #接口限流
30 sentinel:
31 transport:
32 # port: 7777
33 dashboard: sentinel-service.nacos-cluster:8858
34 #取消懒加载
35 eager: true
36 management:
37 endpoint:
38 health:
39 show-details: always
40 endpoints:
41 web:
42 exposure:
43 include: '*'
44 ###暂时禁用rabbit的健康检查
45 health:
46 rabbit:
47 enabled: false
48 sentinel:
49 enabled: false
50 feign:
51 sentinel:
52 enabled: true
...\ No newline at end of file ...\ No newline at end of file
1 server:
2 port: 19210
3 monitor:
4 log-white:
5 #服务全局名称
6 spring:
7 application:
8 name: ms-data-circulation-portal-service
9 jackson:
10 time-zone: Asia/Shanghai
11 cloud:
12 inetutils:
13 ignored-interfaces: docker0 # 让应用忽略docker0网卡
14 compatibility-verifier:
15 enabled: false
16 gateway:
17 gatewayServiceName: gateway-server
18 host: 114.115.131.96
19 kafka:
20 bootstrap-servers: kafka-cs-develop.daop:9092
21 producer:
22 retries: 3
23 main:
24 allow-bean-definition-overriding: true
25 datasource:
26 sql-script-encoding: utf-8
27 #type: org.apache.commons.dbcp2.BasicDataSource
28 #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
29 dynamic:
30 primary: master
31 druid:
32 initial-size: 0
33 max-active: 50
34 min-idle: 2
35 max-wait: -1
36 min-evictable-idle-time-millis: 30000
37 max-evictable-idle-time-millis: 30000
38 time-between-eviction-runs-millis: 0
39 validation-query: select 1
40 validation-query-timeout: -1
41 test-on-borrow: false
42 test-on-return: false
43 test-while-idle: true
44 pool-prepared-statements: true
45 # max-open-prepared-statements: 100
46 filters: stat,wall
47 share-prepared-statements: true
48 wall:
49 config:
50 condition-double-const-allow: true
51 condition-and-alway-true-allow: true
52 ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
53 datasource:
54 master:
55 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
56 username: prg
57 password: E5t391s349wT@3
58 driver-class-name: com.mysql.cj.jdbc.Driver
59 druid:
60 initial-size: 5
61 slave:
62 url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
63 username: prg
64 password: E5t391s349wT@3
65 driver-class-name: com.mysql.cj.jdbc.Driver
66 druid:
67 initial-size: 5
68 # redis配置
69 data:
70 redis:
71 # 集群
72 #cluster:
73 # nodes: redis-service.redis:6379
74 # 单节点
75 host: redis-service.daop
76 port: 6379
77 password: "J7e411m693cA9"
78 timeout: 1000
79 prefix: daop-release
80 jedis:
81 pool:
82 max-idle: 8
83 max-wait: 2000
84 min-idle: 0
85 max-active: 100
86 test-on-borrow: true
87 test-while-idle: true
88 sql:
89 init:
90 schema-locations: classpath*:init.sql
91 encoding: UTF-8
92 mode: never
93 redisson:
94 address: redis://redis-service.daop:6379
95 password: "J7e411m693cA9"
96
97 seata:
98 enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
99 tx-service-group: my_test_tx_group
100 application-id: ms-data-circulation-portal-service
101 registry:
102 type: nacos
103 nacos:
104 application: seata-server
105 cluster: seata-cluster
106 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
107 password: U9u457p155vH@8
108 username: nacos
109 namespace: daop-lt
110 group: release
111 service:
112 vgroupMapping:
113 my_test_tx_group: seata-cluster
114 grouplist:
115 default: ms-daop-seata-service-release:8091
116
117 #数据库字段开启驼峰
118 mybatis:
119 configuration:
120 map-underscore-to-camel-case: true
121 callSettersOnNulls: true
122 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
123 mybatis-plus:
124 global-config:
125 db-config:
126 id-type: ASSIGN_UUID
127 logic-delete-value: "null"
128 logic-not-delete-value: N
129 mapper-locations: classpath*:mapper/**/*Mapper.xml
130 type-aliases-package: com.csbr.qingcloud.configure.mybatis
131 ##生产环境屏蔽此配置 优化性能
132 configuration:
133 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134 pagehelper:
135 helperDialect: mysql
136 reasonable: true
137 supportMethodsArguments: true
138 params: count=countSql
139
140 csbr:
141 kafka:
142 topic-prefix: DAOP-LT-RELEASE
143 consumer:
144 # 开启kafka消费者
145 enable: true
146 # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
147 # bootstrap-servers: 210.12.100.201:9092
148 bootstrap-servers: kafka-cs-develop.daop:9092
149 # bootstrap-servers: 192.168.3.120:9092
150 # 是否启用自动提交 offset
151 enable-auto-commit: false
152 # 自动提交间隔时间(MS),仅在自动提交开启时有效
153 auto-commit-interval: 100
154 # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
155 auto-offset-reset: latest
156 # 消息 key 的反序列化方法
157 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
158 # 消息 value 的反序列化方法
159 value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
160 # listener 开启的线程数
161 concurrency: 2
162 # session 超时时间
163 session-timeout: 60000
164 # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
165 max-poll-interval: 10000
166 # 最大 poll 消息数量
167 max-poll-records: 2
168 producer:
169 # 开启kafka生产者
170 enable: true
171 # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
172 # bootstrap-servers: 210.12.100.201:9092
173 bootstrap-servers: kafka-cs-develop.daop:9092
174 # bootstrap-servers: 192.168.3.120:9092
175 # 失败后的重发次数
176 retries: 0
177 # 一次最多发送的数据量
178 batch-size: 4096
179 # 32M批处理缓冲区
180 buffer-memory: 33554432
181 # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
182 linger: 1
183 feign:
184 hystrix:
185 enabled: false
186
187 query-limit:
188 white: TrTaskValid
189
1 spring:
2 application:
3 name: ms-data-circulation-portal-service
4 cloud:
5 nacos:
6 #配置中心
7 config:
8 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
9 file-extension: yaml
10 group: release
11 namespace: daop-lt
12 # 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新(auto-refresh、enable-remote-sync-config两者缺一不可)
13 auto-refresh: true
14 # 允许nacos服务端向本地同步配置
15 enable-remote-sync-config: true
16 #注册中心
17 discovery:
18 enabled: true
19 server-addr: nacos-cluster-service-develop.nacos-cluster:8848
20 group: release
21 namespace: daop-lt
22 metadata:
23 code: "006"
24 user:
25 name: nacos
26 password: nacos
27 management:
28 context-path: /actuator
29 #接口限流
30 sentinel:
31 transport:
32 # port: 7777
33 dashboard: sentinel-service.nacos-cluster:8858
34 #取消懒加载
35 eager: true
36 management:
37 endpoint:
38 health:
39 show-details: always
40 endpoints:
41 web:
42 exposure:
43 include: '*'
44 ###暂时禁用rabbit的健康检查
45 health:
46 rabbit:
47 enabled: false
48 sentinel:
49 enabled: false
50 feign:
51 sentinel:
52 enabled: true
...\ No newline at end of file ...\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!