Admin 配置项索引
Admin 服务运行于端口 8580,核心配置位于 application-dev.yml。以下按功能分组列出关键配置项。
服务端口
yaml
server:
port: 8580| 配置项 | 说明 | 默认值 |
|---|---|---|
server.port | Admin 服务端口 | 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-name | JDBC 驱动类名 |
Redis
yaml
spring:
data:
redis:
host: localhost
port: 6379
password: ''
database: 0| 配置项 | 说明 | 默认值 |
|---|---|---|
spring.data.redis.host | Redis 主机地址 | localhost |
spring.data.redis.port | Redis 端口 | 6379 |
spring.data.redis.password | Redis 密码 | 空 |
spring.data.redis.database | Redis 数据库索引 | 0 |
Sa-Token
yaml
sa-token:
token-name: Authorization
timeout: 2592000
is-concurrent: true
is-share: true| 配置项 | 说明 | 默认值 |
|---|---|---|
sa-token.token-name | Token 请求头名称 | Authorization |
sa-token.timeout | Token 有效期(秒) | 2592000(30 天) |
sa-token.is-concurrent | 是否允许同一账号并发登录 | true |
sa-token.is-share | 多人登录时是否共用一个 Token | true |
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-locations | Mapper 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.forge | Forge 包日志级别 |
logging.level.org.springframework | Spring 框架日志级别 |
logging.file.name | 日志文件输出路径 |
