Skip to content

Admin 配置项索引

Admin 服务运行于端口 8580,核心配置位于 application-dev.yml。以下按功能分组列出关键配置项。

服务端口

yaml
server:
  port: 8580
配置项说明默认值
server.portAdmin 服务端口8580

数据源

yaml
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/forge_admin?useUnicode=true&characterEncoding=utf8
    username: root
    password: root
    driver-class-name: com.mysql.cj.jdbc.Driver
配置项说明
spring.datasource.url数据库连接地址
spring.datasource.username数据库用户名
spring.datasource.password数据库密码
spring.datasource.driver-class-nameJDBC 驱动类名

Redis

yaml
spring:
  data:
    redis:
      host: localhost
      port: 6379
      password: ''
      database: 0
配置项说明默认值
spring.data.redis.hostRedis 主机地址localhost
spring.data.redis.portRedis 端口6379
spring.data.redis.passwordRedis 密码
spring.data.redis.databaseRedis 数据库索引0

Sa-Token

yaml
sa-token:
  token-name: Authorization
  timeout: 2592000
  is-concurrent: true
  is-share: true
配置项说明默认值
sa-token.token-nameToken 请求头名称Authorization
sa-token.timeoutToken 有效期(秒)2592000(30 天)
sa-token.is-concurrent是否允许同一账号并发登录true
sa-token.is-share多人登录时是否共用一个 Tokentrue

MyBatis-Plus

yaml
mybatis-plus:
  mapper-locations: classpath*:mapper/**/*.xml
  global-config:
    db-config:
      logic-delete-field: deleted
      logic-delete-value: 1
      logic-not-delete-value: 0
配置项说明
mybatis-plus.mapper-locationsMapper XML 扫描路径
mybatis-plus.global-config.db-config.logic-delete-field逻辑删除字段名
mybatis-plus.global-config.db-config.logic-delete-value删除标记值
mybatis-plus.global-config.db-config.logic-not-delete-value未删除标记值

文件存储

yaml
file:
  storage:
    type: minio
    endpoint: http://localhost:9000
    accessKey: minioadmin
    secretKey: minioadmin
    bucketName: forge
配置项说明
file.storage.type存储类型(minio / local / oss
file.storage.endpoint对象存储服务地址
file.storage.accessKey访问密钥
file.storage.secretKey秘密密钥
file.storage.bucketName存储桶名称

日志

yaml
logging:
  level:
    com.forge: debug
    org.springframework: info
  file:
    name: logs/forge-admin.log
配置项说明
logging.level.com.forgeForge 包日志级别
logging.level.org.springframeworkSpring 框架日志级别
logging.file.name日志文件输出路径

Forge Admin — 基于 Vue3 + Spring Boot 的企业级后台管理框架