feat:修复已知问题,提升系统稳定性

This commit is contained in:
dianjiu
2024-08-30 02:04:33 +08:00
parent e98052a69a
commit e821ba4858
568 changed files with 124666 additions and 13 deletions

View File

@@ -0,0 +1,111 @@
spring:
config:
activate:
on-profile: local
servlet:
multipart:
# 上传文件总的最大值
max-request-size: 100MB
# 单个文件的最大值
max-file-size: 100MB
datasource:
# mysql
url: jdbc:mysql://192.168.2.202:3306/remi-paas-ids?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false&nullCatalogMeansCurrent=true
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: Sdt@1020
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
max-active: 20
# 配置获取连接等待超时的时间
max-wait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
time-between-eviction-runs-millis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
min-evictable-idle-time-millis: 300000
# mysql
validation-query: SELECT 1 FROM DUAL
# postgre
#validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 打开PSCache,并且指定每个连接上PSCache的大小
pool-prepared-statements: true
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
max-pool-prepared-statement-per-connection-size: 20
filters: stat,wall
use-global-data-source-stat: true
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
redis:
database: 0
host: 192.168.2.202
password:
port: 6379
jedis:
pool:
max-active: 8
max-idle: 8
min-idle: 0
timeout: 1000
# MinIO
minio:
#对象存储服务的URL
url: http://192.168.2.202:9000
#账户
accessKey: admin
#密码
secretKey: Sdt@1020
#存储桶
bucketName: remi-paas-ids
# 异步线程配置
async:
executor:
thread:
# 核心线程数
corePoolSize: 5
# 最大线程数
maxPoolSize: 20
# 任务队列大小
queueCapacity: 1000
# 缓冲队列中线程的空闲时间
keepAliveSeconds: 3000
# 拦截器
sql-intercept:
tenant:
deptTenant:
enable: true
companyTenant:
enable: true
anonUrlSet: /user/getUserInfoByUserCode,/appInfo/list,/common/getUserInfo,/dept/getDeptByUserCode,/company/getCompanyInfoById,/operateLog/add,/operateLog/page,/operateLog/logPage
field-fill:
createdByIntercept:
enable: true
updateByIntercept:
enable: true
createAtIntercept:
enable: true
updateAtIntercept:
enable: true
## 开启店铺id 拦截器
interceptor:
company:
enabled: true
# 开启系统操作日志
log:
record:
enabled: true
pushUrl: http://localhost:6103/operateLog/add
appName: IDS
# 日志输出路径配置
logback:
# logDir: /Users/dianjiu/Logs/remi/remi-ids-web
logDir: D:\\Logs\\sdt\\paas\\remi-ids-web

View File

@@ -0,0 +1,100 @@
# 服务端口号
server:
port: 8081
# tomcat 配置
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# tomcat最大线程数,默认为200
max-threads: 500
# Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30
spring:
application:
name: remi-ids-web
profiles:
active: ${cfg.env}
# 循环依赖的问题
main:
allow-circular-references: true
# MVC默认的路径匹配策略为PATH_PATTERN_PARSER,需要修改为ANT_PATH_MATCHER 解决swagger兼容性问题
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
# mybatis-plus
mybatis-plus:
configuration:
#控制台打印完整带参数SQL语句
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#mapper映射文件路径
mapper-locations: classpath*:/*-infra/src/main/resources/mapper/*.xml,classpath*:/common-log/src/main/resources/mapper/*.xml, classpath*:/mapper/**.xml
#pagehelper
pagehelper:
# helper-dialect: mysql
#分页插件会自动检测当前的数据库链接,自动选择合适的分页方式。 你可以配置helperDialect 属性来指定分页插件使用哪种方言。
auto-runtime-dialect: true
#分页合理化参数,默认值为 false 。当该参数设置为 true 时, pageNum<=0 时会查询第一页, pageNum>pages (超过总数时),会查询最后一页。
reasonable: true
#支持通过Mapper接口参数传递page参数,默认值为false
support-methods-arguments: true
#默认值为 false ,当该参数设置为 true 时,如果 pageSize=0 或者 RowBounds.limit =0 就会查询出全部的结果(相当于没有执行分页查询,但是返回结果仍然是 Page 类型)。
page-size-zero: true
#为了支持 startPage(Object params) 方法,增加了该参数来配置参数映射,用于从对象中根据属性名取值
params: count=countSql
# feign
feign:
okhttp:
enabled: true
sentinel:
enabled: true
client:
config:
default:
connectTimeout: 100000
readTimeout: 100000
# knife4j配置
knife4j:
#启用
enable: true
#基础认证
basic:
enable: false
username: remi
password: 123456
#增强配置
setting:
enableSwaggerModels: true
enableDocumentManage: true
enableHost: false
enableHostText: http://localhost
enableRequestCache: true
enableFilterMultipartApis: false
enableFilterMultipartApiMethodType: POST
language: zh-CN
enableFooter: false
enableFooterCustom: true
footerCustomContent: Copyright © 2021 Remi All Rights Reserved
# 定义日志输出级别
logging:
config: classpath:logback-spring.xml
level:
ai.remi: info
#spring 包日志输出级别
org.springframework: info
com.alibaba.cloud: info
# undertow
io.undertow: info
# mybatis-plus
com.baomidou.mybatisplus: debug
com.scm.scheduling.infra.mapper: debug
# 日志配置
logback:
appName: remi-ids-web
fileType: log

View File

@@ -0,0 +1,48 @@
# 服务端口号
server:
port: 1010
spring:
application:
name: remi-sys-web
profiles:
active: dev
cloud:
# nacos
nacos:
# 注册中心
username: nacos
password: nacos
discovery:
# 配置中心的地址
server-addr: ${NACOS_HOST:192.168.31.88}:${NACOS_PORT:8848}
#命名空间
namespace: ${SERVICE_NAME_SPACE_NAME:cloud}
# 配置文件的环境
group: ${SERVICE_DISCOVERY_GROUP_NAME:dev}
# 配置中心
config:
# 配置中心的地址
server-addr: ${spring.cloud.nacos.discovery.server-addr}
#命名空间
namespace: ${spring.cloud.nacos.discovery.namespace}
# 配置文件prefix
prefix: ${spring.application.name}
# 配置文件的环境
group: ${spring.cloud.nacos.discovery.group}
# 配置文件的格式
file-extension: yaml
# 配置的编码
encode: UTF-8
# 是否开启监听和自动刷新
refresh-enabled: true
# 共享配置
shared-configs:
# Data Id 的默认完整格式为: ${prefix}-${spring.profile.active}.${file-extension}。
- dataId: cloud-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
group: ${spring.cloud.nacos.discovery.group}
#是否自动刷新
refresh: true

View File

@@ -0,0 +1,83 @@
# 服务端口号
server:
# tomcat 配置
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# tomcat最大线程数,默认为200
max-threads: 500
# Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30
# mybatis-plus
mybatis-plus:
configuration:
#控制台打印完整带参数SQL语句
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#mapper映射文件路径
mapper-locations: classpath*:/*-infra/src/main/resources/mapper/*.xml, classpath*:/mapper/**.xml
#pagehelper
pagehelper:
# helper-dialect: mysql
#分页插件会自动检测当前的数据库链接,自动选择合适的分页方式。 你可以配置helperDialect 属性来指定分页插件使用哪种方言。
auto-runtime-dialect: true
#分页合理化参数,默认值为 false 。当该参数设置为 true 时, pageNum<=0 时会查询第一页, pageNum>pages (超过总数时),会查询最后一页。
reasonable: true
#支持通过Mapper接口参数传递page参数,默认值为false
support-methods-arguments: true
#默认值为 false ,当该参数设置为 true 时,如果 pageSize=0 或者 RowBounds.limit =0 就会查询出全部的结果(相当于没有执行分页查询,但是返回结果仍然是 Page 类型)。
page-size-zero: true
#为了支持 startPage(Object params) 方法,增加了该参数来配置参数映射,用于从对象中根据属性名取值
params: count=countSql
# feign
feign:
okhttp:
enabled: true
hystrix:
enabled: true
sentinel:
enabled: true
client:
config:
default:
connectTimeout: 100000
readTimeout: 100000
# springdoc-openapi项目配置
springdoc:
swagger-ui:
path: /swagger-ui.html
api-docs:
path: /v3/api-docs
# knife4j的增强配置,不需要增强可以不配
knife4j:
enable: true
setting:
language: zh-CN
# 定义日志输出级别
logging:
level:
ai.remi: debug
# spring 包日志输出级别
org.springframework: info
# alibaba 包日志输出级别
com.alibaba.cloud: info
# nacos 心跳 INFO 屏蔽
com.alibaba.nacos: off
# undertow
io.undertow: info
# mybatis-plus
com.baomidou.mybatisplus: debug
spring:
# 循环依赖的问题
main:
allow-circular-references: true
# MVC默认的路径匹配策略为PATH_PATTERN_PARSER,需要修改为ANT_PATH_MATCHER 解决swagger兼容性问题
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER

View File

@@ -0,0 +1,122 @@
spring:
application:
name: remi-sys-web
config:
activate:
on-profile: dev
servlet:
multipart:
# 上传文件总的最大值
max-request-size: 100MB
# 单个文件的最大值
max-file-size: 100MB
datasource:
# mysql
url: jdbc:mysql://192.168.31.66:3306/remi-saas-iam?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false&nullCatalogMeansCurrent=true
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 123456
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
max-active: 20
# 配置获取连接等待超时的时间
max-wait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
time-between-eviction-runs-millis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
min-evictable-idle-time-millis: 300000
# mysql
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 打开PSCache,并且指定每个连接上PSCache的大小
pool-prepared-statements: true
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
max-pool-prepared-statement-per-connection-size: 20
filters: stat,wall
use-global-data-source-stat: true
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
redis:
database: 0
host: 192.168.31.66
password: ydsz1020
port: 6379
jedis:
pool:
max-active: 8
max-idle: 8
min-idle: 0
timeout: 1000
# 异步线程配置
async:
executor:
thread:
# 核心线程数
corePoolSize: 10
# 最大线程数
maxPoolSize: 30
# 任务队列大小
queueCapacity: 3000
# 缓冲队列中线程的空闲时间
keepAliveSeconds: 300
# MinIO
minio:
#对象存储服务的URL
url: http://192.168.31.88:9000
#账户
accessKey: admin
#密码
secretKey: Sdt@1020~
#存储桶
bucketName: remi-paas-iam
# 拦截器
sql-intercept:
tenant:
deptTenant:
enable: true
companyTenant:
enable: true
anonUrlSet: /sso/login/ticket,/sso/login/other,/sso/login/local,/sso/logout,/sso/oauth2/accessToken,/sso/oauth2/refreshToken,/sso/oauth2/checkToken,/logRecord/add,/logRecord/pageLogin,/logRecord/pageOperate,/logRecord/pageException
field-fill:
createdByIntercept:
enable: true
updateByIntercept:
enable: true
createAtIntercept:
enable: true
updateAtIntercept:
enable: true
# springdoc-openapi项目配置
springdoc:
#是否开启文档功能
group-configs:
- group: 'iam-web'
paths-to-match: '/**'
packages-to-scan: ai.remi.iam.web
# 开启系统操作日志
log:
record:
enabled: true
appName: IAM
pushUrl: http://localhost:6103/operateLog/add
# 日志输出路径配置
logback:
logDir: D:\Logs\sdt\cloud\${spring.application.name}\
maxSize: 500MB
maxDays: 30
# 应用信息
appInfo:
code: iam
key: kxxyuc46
secret: f62b0078aa9b9bcc953b71d614fe999b