QDAirPortBackend0122/deploy/config.yml

278 lines
6.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# QAUP 生产环境配置
# 基于 Docker Compose 的简化部署配置
# 服务器配置
server:
port: 8080
servlet:
context-path: /
tomcat:
uri-encoding: UTF-8
accept-count: 1000
threads:
max: 800
min-spare: 100
connection-timeout: 20000
keep-alive-timeout: 60000
# Spring 配置
spring:
# 数据源配置
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: org.postgresql.Driver
druid:
master:
url: jdbc:postgresql://qaup-postgres:5432/qaup?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: qaup
password: qaup123
slave:
enabled: false
# 生产环境连接池配置
initialSize: 10
minIdle: 20
maxActive: 100
maxWait: 60000
connectTimeout: 30000
socketTimeout: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
maxEvictableIdleTimeMillis: 900000
validationQuery: SELECT version()
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 生产环境监控配置
webStatFilter:
enabled: false
statViewServlet:
enabled: false
filter:
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 2000
merge-sql: true
wall:
config:
multi-statement-allow: true
# Redis 配置
data:
redis:
host: qaup-redis
port: 6379
database: 0
timeout: 10s
lettuce:
pool:
min-idle: 5
max-idle: 20
max-active: 50
max-wait: -1ms
# JPA 配置
jpa:
hibernate:
ddl-auto: none
show-sql: false
properties:
hibernate:
format_sql: false
jdbc:
lob:
non_contextual_creation: true
batch_size: 100
fetch_size: 100
cache:
use_second_level_cache: false
use_query_cache: false
order_inserts: true
order_updates: true
batch_versioned_data: true
generate_statistics: false
# 资源信息
messages:
basename: i18n/messages
# 文件上传
servlet:
multipart:
max-file-size: 10MB
max-request-size: 20MB
# Jackson配置
jackson:
date-format: yyyy-MM-dd HH:mm:ss
serialization:
indent_output: false
fail_on_empty_beans: false
deserialization:
fail_on_unknown_properties: false
# Flyway数据库迁移配置
flyway:
enabled: ${SPRING_FLYWAY_ENABLED:true}
locations: classpath:db/migration
baseline-on-migrate: ${SPRING_FLYWAY_BASELINE_ON_MIGRATE:true}
baseline-version: 1.0.0
baseline-description: "Initial baseline from existing database"
validate-on-migrate: ${SPRING_FLYWAY_VALIDATE_ON_MIGRATE:true}
clean-disabled: ${SPRING_FLYWAY_CLEAN_DISABLED:true}
out-of-order: false
encoding: UTF-8
placeholder-replacement: false
table: flyway_schema_history
# Flyway生产环境安全配置
flyway:
backup:
enabled: true
directory: /app/backup/flyway
# 项目配置
qaup:
name: QAUP
version: 1.0.1
copyrightYear: 2025
profile: /app/uploadPath
addressEnabled: false
captchaType: math
# 用户配置
user:
password:
maxRetryCount: 5
lockTime: 10
# Token 配置
token:
header: Authorization
secret: abcdefghijklmnopqrstuvwxyz
expireTime: 30
# MyBatis配置
mybatis:
typeAliasesPackage: com.qaup.system.domain,com.qaup.common.core.domain.entity,com.qaup.generator.domain,com.qaup.quartz.domain,com.qaup.collision.common.model.spatial,com.qaup.collision.datacollector.model.dto,com.qaup.collision.geofence.model.entity
mapperLocations: classpath*:mapper/**/*Mapper.xml
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
helperDialect: postgresql
reasonable: true
supportMethodsArguments: true
params: count=countSql
# 日志配置
logging:
level:
com.qaup: info
org.springframework: warn
org.hibernate: warn
com.alibaba.druid: warn
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
file:
name: /app/logs/qaup.log
max-size: 100MB
max-history: 30
# XSS 防护
xss:
enabled: true
excludes: /system/notice
urlPatterns: /system/*,/monitor/*,/tool/*
# 数据采集配置
data:
collector:
interval: 250
route:
interval: 5000
detection:
interval: 1000
airport-api:
# 机场API服务地址客户部署时需要修改为实际地址
base-url: http://192.168.1.100:8090
endpoints:
login: /login
refresh: /userInfoController/refreshToken
aircraft: /openApi/getCurrentFlightPositions
vehicle: /openApi/getCurrentVehiclePositions
arrival-route: /runwayPathPlanningController/findArrTaxiwayByRunwayAndContactCrossAndSeat
departure-route: /runwayPathPlanningController/findDepTaxiwayByRunwayAndContactCrossAndSeat
aircraft-status: /aircraftStatusController/getAircraftStatus
auth:
username: dianxin
password: dianxin@123
vehicle-api:
# 车辆API服务地址客户部署时需要修改为实际地址
base-url: http://192.168.1.100:8090
endpoints:
vehicle-location: /api/VehicleLocationInfo
vehicle-state: /api/VehicleStateInfo
vehicle-command: /api/VehicleCommandInfo
timeout: 1000
retry-attempts: 3
unmanned-vehicle:
persistence:
enabled: true
batch-size: 50
location-retention-days: 90
command-retention-days: 365
command:
timeout: 1000
retry-attempts: 3
validation:
enabled: true
strict-mode: false
retention:
redis-expire-seconds: 60
postgresql-days: 30
# 红绿灯系统配置
traffic:
light:
tcp:
enabled: true
port: 8082
max-connections: 50
connection-timeout: 30000
heartbeat-timeout-minutes: 5
intersection:
default-id: "DEFAULT_INTERSECTION"
processing:
enable-statistics: true
statistics-interval: 60000
enable-debug-log: false
signal-process-timeout: 5000
# 坐标系统配置
coordinate-system:
airport:
# 青岛机场坐标(客户部署时需要修改为实际机场坐标)
center-longitude: 120.0834104
center-latitude: 36.35406879
# 管理端点配置
management:
endpoints:
web:
exposure:
include: "health,info,metrics"
endpoint:
health:
show-details: when_authorized
metrics:
export:
simple:
enabled: true
enable:
hikari: true
jvm: true
jmx:
enabled: true