主要修改:
1. 在QrProxyController中引入LinkStatusService,通过codeNo查询对应的machineId,优化二维码和图片的获取逻辑。
2. 更新所有相关的图片访问路径,确保使用新的/image/{codeNo}格式。
3. 在GameInterfaceResponse中新增machineId和completedPoints字段,提供更详细的游戏界面数据。
4. 更新SecurityConfig,允许/image/**路径的公开访问。
技术细节:
- 通过优化接口逻辑和数据结构,提升了系统的灵活性和用户体验,同时确保了安全性和可维护性。
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 # 下载超时时间(秒)
|