Commit 01475acb by chentianzhong

1111111

parents
This diff is collapsed. Click to expand it.
package com.zq.email;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableFeignClients
@SpringBootApplication(scanBasePackages = {"com.zq.email", "com.zq.common.config"})
@MapperScan("com.zq.email.mapper")
@EnableTransactionManagement
public class EmailApplication {
public static void main(String[] args) {
SpringApplication.run(EmailApplication.class, args);
}
}
#配置数据源
spring:
redis:
#数据库索引
database: 0
host: 127.0.0.1
port: 6379
password:
#连接超时时间
timeout: 5000
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:kingbase8://172.18.4.84:54321/SEAL_PLATFOMR
username: oa_system
password: 123456
driver-class-name: com.kingbase8.Driver
# 初始连接数
initial-size: 5
# 最小连接数
min-idle: 10
# 最大连接数
max-active: 20
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
# 连接在池中最大生存的时间
max-evictable-idle-time-millis: 900000
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 检测连接是否有效
validation-query: select 1
# 配置监控统计
webStatFilter:
enabled: true
#安全配置
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: GXfy2021
allow: 127.0.0.1,147.1.*.*
filter:
stat:
enabled: true
# 记录慢SQL
log-slow-sql: true
slow-sql-millis: 2000
merge-sql: true
wall:
config:
multi-statement-allow: true
#是否开启 swagger-ui
swagger:
enabled: true
\ No newline at end of file
#配置数据源
spring:
redis:
#数据库索引
database: 0
host: 127.0.0.1
port: 6379
password:
#连接超时时间
timeout: 5000
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:kingbase8://127.0.0.1:54321/SEAL_PLATFOMR
username: oa_system
password: 123456
driver-class-name: com.kingbase8.Driver
# 初始连接数
initial-size: 5
# 最小连接数
min-idle: 10
# 最大连接数
max-active: 20
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
# 连接在池中最大生存的时间
max-evictable-idle-time-millis: 900000
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 检测连接是否有效
validation-query: select 1
# 配置监控统计
webStatFilter:
enabled: true
#安全配置
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: GXfy2021
allow: 127.0.0.1,147.1.*.*
filter:
stat:
enabled: true
# 记录慢SQL
log-slow-sql: true
slow-sql-millis: 2000
merge-sql: true
wall:
config:
multi-statement-allow: true
#是否开启 swagger-ui
swagger:
enabled: true
\ No newline at end of file
#配置数据源
spring:
redis:
#数据库索引
database: 0
host: 147.2.3.18
port: 6379
password: zq4208!@#$
timeout: 5000
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:kingbase8://147.2.3.4:54321/EMAIL?ConfigurePath=/opt/db-config/EMAIL/jdbc_new.conf
username: oa_system
password: GXfy/2014!@#$
driver-class-name: com.kingbase8.Driver
# 初始连接数
initial-size: 20
# 最小连接数
min-idle: 20
# 最大连接数
max-active: 50
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
# 连接在池中最大生存的时间
max-evictable-idle-time-millis: 900000
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 检测连接是否有效
validation-query: select 1
# 配置监控统计
webStatFilter:
enabled: true
#安全配置
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: GXfy2021
allow: 127.0.0.1,147.1.*.*
filter:
stat:
enabled: true
# 记录慢SQL
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
#是否开启 swagger-ui
swagger:
enabled: false
\ No newline at end of file
#配置数据源
spring:
redis:
#数据库索引
database: 0
host: 147.2.3.2
port: 6379
password: zq4208!@#$
timeout: 5000
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:kingbase8://147.2.3.4:54321/EMAIL?ConfigurePath=/opt/db-config/EMAIL/jdbc_new.conf
username: oa_system
password: GXfy/2014!@#$
driver-class-name: com.kingbase8.Driver
# 初始连接数
initial-size: 20
# 最小连接数
min-idle: 20
# 最大连接数
max-active: 50
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
# 连接在池中最大生存的时间
max-evictable-idle-time-millis: 900000
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 检测连接是否有效
validation-query: select 1
# 配置监控统计
webStatFilter:
enabled: true
#安全配置
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: GXfy2021
allow: 127.0.0.1,147.1.*.*
filter:
stat:
enabled: true
# 记录慢SQL
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
#是否开启 swagger-ui
swagger:
enabled: false
\ No newline at end of file
server:
port: 8197
#配置数据源
spring:
application:
name: EMAIL-SERVER
servlet:
#上传文件限制
multipart:
#单个文件大小
max-file-size: 500MB
#设置总上传的数据大小
max-request-size: 500MB
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
default-property-inclusion: non_null
# mybatis plus 配置
mybatis-plus:
global-config:
db-config:
select-strategy: not_empty
update-strategy: not_empty
#日志
logging:
config: classpath:logback-spring.xml
spring:
profiles:
active: @profiles.active@
cloud:
config:
name: config
profile: ${spring.profiles.active}
discovery:
enabled: true
service-id: CONFIG-SERVER
username: admin
password: GXfy2021
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 2 #每间隔1s,向服务端发送一次心跳,证明自己依然"存活"
lease-expiration-duration-in-seconds: 6 #告诉服务端,如果我2s之内没有给你发心跳,就代表我"死"了,将我踢出掉。
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
serviceUrl:
defaultZone: @eureka.server.url@
#Feign 超时配置
feign:
hystrix:
enabled: false
httpclient:
enabled: false
okhttp:
enabled: true
client:
config:
FILE-SERVER:
connectTimeout: 10000
readTimeout: 30000
ribbon:
okhttp:
enabled: true
ConnectTimeout: 10000
ReadTimeout: 30000
OkToRetryOnAllOperations: false
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 30000
threadpool:
default:
coreSize: 200 #并发执行的最大线程数,默认10
maxQueueSize: 1000 #BlockingQueue的最大队列数,默认值-1
queueSizeRejectionThreshold: 800 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝,默认值5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment