110 lines
3.7 KiB
YAML
110 lines
3.7 KiB
YAML
server:
|
||
port: 48100
|
||
|
||
spring:
|
||
application:
|
||
name: demo-server
|
||
main:
|
||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||
profiles:
|
||
active: local
|
||
|
||
# Servlet 配置
|
||
servlet:
|
||
# 文件上传相关配置项
|
||
multipart:
|
||
max-file-size: 16MB # 单个文件大小
|
||
max-request-size: 32MB # 设置总上传的文件大小
|
||
|
||
# Jackson 配置项
|
||
jackson:
|
||
serialization:
|
||
write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
|
||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
||
|
||
# Cache 配置项
|
||
cache:
|
||
type: REDIS
|
||
redis:
|
||
time-to-live: 1h # 设置过期时间为 1 小时
|
||
|
||
---
|
||
springdoc:
|
||
api-docs:
|
||
enabled: true
|
||
path: /v3/api-docs
|
||
swagger-ui:
|
||
enabled: true
|
||
path: /swagger-ui
|
||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
||
|
||
knife4j:
|
||
enable: true
|
||
setting:
|
||
language: zh_cn
|
||
|
||
# MyBatis Plus 的配置项
|
||
mybatis-plus:
|
||
configuration:
|
||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||
global-config:
|
||
db-config:
|
||
id-type: NONE # "智能"模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||
banner: false # 关闭控制台的 Banner 打印
|
||
type-aliases-package: cn.iocoder.yudao.demoserver.dal.dataobject
|
||
|
||
# Spring Data Redis 配置
|
||
spring:
|
||
data:
|
||
redis:
|
||
repositories:
|
||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
||
|
||
---
|
||
yudao:
|
||
info:
|
||
version: 1.0.0
|
||
base-package: cn.iocoder.yudao
|
||
author: chenbw
|
||
description: Demo 服务器
|
||
web:
|
||
admin-ui:
|
||
url: http://localhost:3000 # Admin 管理后台 UI 的地址
|
||
xss:
|
||
enable: false
|
||
security:
|
||
permit-all_urls: []
|
||
websocket:
|
||
enable: true # websocket的开关
|
||
path: /infra/ws # 路径
|
||
sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq
|
||
sender-rocketmq:
|
||
topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic
|
||
consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group
|
||
sender-rabbitmq:
|
||
exchange: ${spring.application.name}-websocket-exchange # 消息发送的 RabbitMQ Exchange
|
||
queue: ${spring.application.name}-websocket-queue # 消息发送的 RabbitMQ Queue
|
||
sender-kafka:
|
||
topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic
|
||
consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group
|
||
swagger:
|
||
title: demo-server
|
||
description: Demo 服务器
|
||
version: ${yudao.info.version}
|
||
email: xingyu4j@vip.qq.com
|
||
license: MIT
|
||
license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE
|
||
codegen:
|
||
base-package: cn.iocoder.yudao.demoserver
|
||
db-schemas: ${spring.datasource.dynamic.datasource.master.name}
|
||
front-type: 20 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类
|
||
vo-type: 10 # VO 的类型,参见 CodegenVOTypeEnum 枚举类
|
||
delete-batch-enable: true # 是否生成批量删除接口
|
||
unit-test-enable: false # 是否生成单元测试
|
||
|
||
debug: false
|