主要修改: 1. 在pom.xml中新增spring-boot-starter-aop依赖,支持面向切面编程。 2. 在LinkController中移除DeviceCodeMappingService的依赖,更新二维码获取逻辑,使用linkStatusService获取设备ID。 3. 在SelectRegionResponse中新增mecmachineId字段,便于调试和维护。 4. 在SecurityConfig中允许二维码HEAD请求公开访问。 技术细节: - 通过引入AOP支持,提升了代码的可维护性和扩展性,同时优化了链接控制器的逻辑,确保设备ID的获取更加灵活。
85 lines
2.1 KiB
YAML
85 lines
2.1 KiB
YAML
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
|
|
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: info
|
|
com.baomidou.mybatisplus: info
|
|
org.apache.ibatis: info
|
|
com.zaxxer.hikari: info
|
|
|
|
security:
|
|
jwt:
|
|
secret: "change-this-secret-to-a-long-random-string-please"
|
|
access-token-minutes: 30
|
|
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://2.uzi0.cc" # 生产环境需要配置为实际域名
|
|
base-url: "http://localhost:18080" # 本地测试环境
|
|
image-save-path: "./images" # 图片保存路径
|
|
|
|
link:
|
|
expire-hours: 2
|
|
|
|
# 图片保存配置
|
|
image:
|
|
save-interval-minutes: 3 # 进行中任务图片保存间隔(分钟)
|
|
max-concurrent-downloads: 3 # 最大并发下载数
|
|
download-timeout-seconds: 15 # 下载超时时间(秒)
|