project:
name: start
# 应用服务 WEB 访问端口
server:
port: 6060
# 是否开启debug模式
debug: false
# 解决一直打印日志
logging:
level:
com.baijiayun.blazers.ai.infrastructure.gatewayimpl: DEBUG
com.baijiayun.blazers.ai.infrastructure.controller: TRACE
config: classpath:log4j2-prod.xml
# 应用名称
spring:
aop:
proxy-target-class: true
resource:
static-locations: classpath:/static/,classpath:/public/
# application:
# name: ai-aat-service
main:
# 允许覆盖Bean
allow-bean-definition-overriding: true
servlet:
multipart:
# 文件上传大小限制
max-file-size: 1024MB
max-request-size: 1024MB
#resources:
# spring 静态资源扫描路径
#static_locations: classpath:/static/
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/ai_algo_aat?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=CTT&allowMultiQueries=true&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
# 本地链接MySQL,用公网地址: mysql-internet-cn-north-1-5f17115919024624.rds.jdcloud.com
username: root
password: 123456
# 配置数据源相关:使用 HikariCP 数据源
hikari:
# 连接池名字
pool-name: ai-aat-service-hikariCP
# 等待连接池分配连接的最大时长(毫秒),超过这个时长还没可用的连接则发生SQLException, 默认:30秒
connection-timeout: 30000
# 最小空闲连接数量,默认值10
minimum-idle: 5
# 最大连接数(包括空闲和正在使用的连接),默认值是10
maximum-pool-size: 15
# 是否自动提交池中返回的连接。默认值为true。
auto-commit: true
# 空闲时间。仅在minimum-idle小于maximum-poop-size的时候才会起作用。默认值10分钟。
idle-timeout: 600000
# 一个连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认:30分钟 1800000ms,建议设置比数据库超时时长少60秒,参考MySQL wait_timeout参数(show variables like '%timeout%';)
max-lifetime: 28740000
# 在连接从池中获得连接以确认与数据库的连接仍然存在之前将要执行的查询。
connection-test-query: SELECT 1
redis:
database: 0
host: 127.0.0.1
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 -1 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1 #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: 123456
port: 6379
redisson:
config:
singleServerConfig:
idleConnectionTimeout: 10000
connectTimeout: 10000
timeout: 3000
retryAttempts: 3
retryInterval: 1500
password: "123456"
subscriptionsPerConnection: 5
clientName: "redis"
address: "redis://127.0.0.1:6379"
subscriptionConnectionMinimumIdleSize: 1
subscriptionConnectionPoolSize: 50
connectionMinimumIdleSize: 32
connectionPoolSize: 64
database: 0
dnsMonitoringInterval: 30000
threads: 0
nettyThreads: 0
codec: "!<org.redisson.codec.JsonJacksonCodec> {}"
transportMode: "NIO"
# mybatis+mybatis-plus
mybatis:
mapper-locations: classpath:mybatis/mapper/**/*.xml,classpath*:org/bjy/modules/**/xml/*Mapper.xml
type-aliases-package: com.baijiayun.blazers.ai.*.*,;org.bjy.modules.system.*
mybatis-plus:
mapper-locations: classpath:mybatis/mapper/**/*.xml,classpath*:org/bjy/modules/**/xml/*Mapper.xml
type-aliases-package: com.baijiayun.blazers.ai.*.*,;org.bjy.modules.system.*
# 系统线程池设置
async:
executor:
# 默认线程池
default:
prefix: async-executor-default- # 配置线程池中的线程的名称前缀
core_pool_size: 4 # 配置核心线程数
max_pool_size: 8 # 配置最大线程数
keep_alive_seconds: 300 # 配置空闲时间
queue_capacity: 100 # 配置队列大小
redis:
cache:
# redisson spring cache
expires:
# 数据字典
dataDict: 3000
# 项目任务
projectTask: 3000
upload:
prefix: ''
comm:
# 服务器上传的文件器访问域名地址前缀
site: '/upload/comm'
# 服务器本地上传文件的根目录
dir_path: '/data2/ai-algo-aat/upload/comm'
nas_path: '/data2/ai-algo-aat/upload/comm'
project_task:
site: '/upload/img'
dir_path: '/data2/ai-algo-aat/upload/img'
nas_path: '/data2/ai-algo-aat/upload/img'
collection:
site: '/collect/img'
dir_path: '/data2/ai-algo-aat/collect/img'
nas_path: '/data2/ai-algo-aat/collect/img'
stream_video:
site: '/collect/stream_video'
dir_path: '/data2/ai-algo-aat/collect/stream_video'
nas_path: '/data2/ai-algo-aat/collect/stream_video'
deploy_package:
site: '/upload/basePackage/packageZip'
dir_path: '/data2/ai-algo-aat/upload/basePackage/packageZip'
nas_path: '/data2/ai-algo-aat/upload/basePackage/packageZip'
api:
algo:
train:
# 算法训练的api地址
url: 'http://0.0.0.0:10004'
imgModel: '/inferTask'
qrCodeModel: '/inferBarcode'
collect:
task:
# 发起采集任务
url: 'http://0.0.0.0:8999'
three:
class:
# 三个课堂
url: 'https://test-threeclassroom.baijiayun.com'
key: '0267784512fcbbc8120f66b74b261e9f'
# swagger
swagger2:
enable: true
# 配置GPU服务器的监听地址和端口
gpu:
host: gpu.metrics
port: 9400
# 视频流分类
stream:
prefix:
webrtc: 'webrtc://0.0.0.0:8081/main/'
rtsp: 'rtsp://0.0.0.0:8085/main/'
rtmp: 'rtmp://0.0.0.0:8083/main/'
bjy:
management:
auth:
bean:
shiroConfig: true
ShiroRealm: true
RedisUtil: true
RedisConfig: true
GlobalExceptionHandler: false
MybatisPlusSaasConfig: true
MybatisInterceptor: true
# shiroConfig: true
# ShiroRealm: true
# RedisUtil: true
# RedisConfig: true
# GlobalExceptionHandler: false
# 签名密钥串(前后端要一致,正式发布请自行修改)
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
# 本地:local\Minio:minio\阿里云:alioss
uploadType: minio
path :
#文件上传根目录 设置
upload: /opt/upFiles
#webapp文件路径
webapp: /opt/webapp
shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/middle/**,/pc/user/login,/pc/algo/version/trainCallback,/pc/algo/version/modelCallback,/task/getToken,/webSocket/**,/onlineVideoStream/modelCallback,/license/verityLicense,/error,/sys/loginWithoutCaptcha
# 共有8个级别,按照从低到高为:ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF。
# intLevel值依次为0,100,200,300,400,500,600,700
# intLevel 值越小,级别越高
Configuration:
# 日志框架本身的输出日志级别
status: WARN
# 自动加载配置文件的间隔时间,不低于5秒
monitorInterval: 5
packages: com.smartadmin.config.log.plugin
Properties: # 定义全局变量
Property: # 缺省配置(用于开发环境)。其他环境需要在VM参数中指定,如下:
- name: LOG_PATH # 输出文件路径
value: ./logs
- name: DEFAULT_FILENAME # 默认文件名
value: spring
- name: DEFAULT_PATTERN # 默认日志输出格式
value: "%d{HH:mm:ss.SSS} %5p ${sys:PID} --- [%15.15t] %-40.40c{1.} : %m%n%xwEx"
Appenders:
Console: #控制台输出
name: CONSOLE
target: SYSTEM_OUT
PatternLayout: # 日志消息格式
pattern: "%clr{%d{HH:mm:ss.SSS}}{faint} %clr{%5p} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %X{user} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n%xwEx"
RollingFile: # 输出到文件,超过128MB归档
- name: FILE
fileName: ${LOG_PATH}/app/app.log #输出文件的地址
ignoreExceptions: false
filePattern: "${LOG_PATH}/app/%d{yyyy-MM-dd}-%i.zip" # 文件生成规则
ThresholdFilter: # 日志级别过滤器
level: DEBUG # 日志级别
onMatch: ACCEPT # 高于INFO级别放行
onMismatch: DENY # 低于INFO级别拦截
PatternLayout:
pattern: "${DEFAULT_PATTERN}"
Policies: # 日志拆分规则
SizeBasedTriggeringPolicy: # 日志拆分规则
size: "128 MB"
TimeBasedTriggeringPolicy: # 按天分类
modulate: true
interval: 1
DefaultRolloverStrategy: # 单目录下,文件最多20个,超过会删除最早之前的
max: 20
- name: ERROR_FILE
fileName: ${LOG_PATH}/err/err.log #输出文件的地址
ignoreExceptions: false
filePattern: "${LOG_PATH}/err/%d{yyyy-MM-dd}-%i.zip" # 文件生成规则
# ThresholdFilter: # 日志级别过滤器
# level: WARN # 日志级别
# onMatch: ACCEPT # 高于INFO级别放行
# onMismatch: DENY # 低于INFO级别拦截
PatternLayout:
pattern: "${DEFAULT_PATTERN}"
Policies: # 日志拆分规则
SizeBasedTriggeringPolicy: # 日志拆分规则
size: "128 MB"
TimeBasedTriggeringPolicy: # 按天分类
modulate: true
interval: 1
DefaultRolloverStrategy: # 单目录下,文件最多20个,超过会删除最早之前的
max: 20
# 自定义Appender
# OperatorLogEsAppender:
# - name: OPERATOR_LOG_FILE
# ignoreExceptions: false
# PatternLayout:
# pattern: "%m%n%xwEx"
Loggers:
Root:
level: INFO #root的级别为info,如果为debug的话,输出的内容太多
AppenderRef:
- ref: CONSOLE
Logger:
# 操作日志
# - name: com.smartadmin.config.log.OperatorLogAspect
# level: INFO
# AppenderRef:
# - ref: OPERATOR_LOG_FILE
# - name: com.smartadmin.config.exception.CatchException
# level: INFO
# AppenderRef:
# - ref: OPERATOR_LOG_FILE
# # 登录日志
# - name: com.smartadmin.controller.common.LoginController.loginLog
# level: TRACE
# AppenderRef:
# - ref: LOGIN_LOG_FILE
- name: com.mysql
level: INFO
- name: bboss
level: INFO
- name: org.springframework
level: WARN
- name: org.spring.springboot.dao
level: DEBUG
- name: org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver
level: ERROR
- name: com.smartadmin
level: DEBUG
AppenderRef:
- ref: FILE
AlgoVersionImport
文档更新时间: 2023-12-18 03:26 作者:JeffreyCheung