Files
game_server/src/main/resources/application.yml

96 lines
2.9 KiB
YAML
Raw 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.

spring:
application:
name: gameplatform-server
datasource:
url: jdbc:mysql://192.140.164.137:3306/login_task_db?useSSL=false&serverTimezone=UTC&characterEncoding=utf8&allowPublicKeyRetrieval=true
username: login_task_db
password: 3MaXfeWJ4d6cGMrL
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
mybatis-plus:
mapper-locations: classpath:mapper/**/*.xml
type-aliases-package: com.gameplatform.server.model.entity
configuration:
map-underscore-to-camel-case: true
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 注释掉以关闭SQL日志
global-config:
db-config:
id-type: auto
logic-delete-field: deleted
logic-delete-value: 1
logic-not-delete-value: 0
server:
port: 18080
management:
endpoints:
web:
exposure:
include: health,info
logging:
level:
root: info
com.gameplatform.server: debug # 保持整体调试
# 仅保留设备解析最终汇总INFO其余降级
com.gameplatform.server.service.device.DeviceStatusService: info
com.gameplatform.server.service.device.DeviceStatusCheckService: info
# 脚本客户端与定时任务降噪
com.gameplatform.server.service.external.ScriptClient: warn
com.gameplatform.server.task.DeviceStatusCheckTask: warn
com.gameplatform.server.task.UsingLinkCheckTask: warn
# 完成检测服务降噪屏蔽debug“置信度低”之类日志
com.gameplatform.server.service.detection.GameCompletionDetectionService: warn
# 设备任务更新服务:只保留警告/错误(不输出“开始处理设备/点数已更新为”等调试信息)
com.gameplatform.server.service.link.DeviceTaskUpdateService: warn
# Mapper 与 SQL 调用降噪(屏蔽 MyBatis 的参数/SQL DEBUG
com.gameplatform.server.mapper: warn
com.baomidou.mybatisplus: warn
org.apache.ibatis: warn
org.mybatis: warn
com.zaxxer.hikari: warn
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
console:
enabled: true
security:
jwt:
secret: "change-this-secret-to-a-long-random-string-please"
access-token-minutes: 1440
refresh-token-days: 7
# Swagger/OpenAPI 配置
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
doc-expansion: none
disable-swagger-default-url: true
display-request-duration: true
packages-to-scan: com.gameplatform.server.controller
# 外部脚本端配置与链接过期时间
script:
base-url: "http://36.138.184.60:12345"
api-base-url: "http://36.138.184.60:1234"
connect-timeout-ms: 3000
read-timeout-ms: 5000
# 服务器配置
app:
base-url: "https://uzi1.cn" # 生产环境需要配置为实际域名
# base-url: "http://localhost:18080" # 本地测试环境
link:
expire-hours: 2