server:
|
port: 8888 # 项目端口
|
servlet:
|
context-path: /device # 项目访问路径
|
servers:
|
main-url: http://127.0.0.1:9999/admin
|
|
spring:
|
application:
|
name: @project.artifactId@ # 服务名称,取 pom.xml 中的 artifactId
|
# 上传文件大小限制
|
servlet:
|
multipart:
|
max-file-size: 100MB # 单个文件最大
|
max-request-size: 100MB # 接收的最大请求大小
|
cloud:
|
nacos: # 单机版本关闭nacos 服务发现和配置管理的能力
|
config:
|
enabled: false
|
discovery:
|
enabled: false
|
gateway:
|
enabled: false
|
main:
|
allow-bean-definition-overriding: true # 允许覆盖bean定义
|
profiles:
|
active: dev # 激活dev,对应 application-dev.yml
|
redis:
|
database: 5
|
|
|
## spring security 对外暴露接口设置(不鉴权直接可访问)
|
security:
|
micro: false
|
oauth2:
|
client:
|
ignore-urls:
|
- /webjars/**
|
- /v3/api-docs/**
|
- /doc.html
|
- /swagger-ui.html
|
- /swagger-ui/**
|
- /swagger-resources
|
- /token/check_token
|
- /error
|
- /druid/**
|
- /actuator/**
|
- /code/**
|
|
#--------------如下配置尽量不要变动-------------
|
# mybatis-plus 配置
|
mybatis-plus:
|
mapper-locations: classpath*:/mapper/*Mapper.xml # mapper文件位置
|
global-config:
|
banner: false # 是否打印 mybatis-plus banner
|
db-config:
|
id-type: auto # 主键类型
|
where-strategy: not_empty # where 条件策略
|
insert-strategy: not_empty # 插入策略
|
update-strategy: not_null # 更新策略
|
type-handlers-package: com.by4cloud.platformx.common.data.handler # 类型处理器包
|
configuration:
|
jdbc-type-for-null: 'null' # 是否设置字段为null
|
call-setters-on-nulls: true # 是否调用set方法时传入null值
|
shrink-whitespaces-in-sql: true # 去掉sql中多余的空格
|