xuefei
2024-07-08 2cb1815b1616b6b4e81fd4deeea5dfdef63837d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
server:
  port: 8888    # 项目端口
  servlet:
    context-path: /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
 
 
## 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中多余的空格