xiangpei
2025-04-18 0aa739db8268b442ab74634289ffed00124a976a
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
server:
  port: 9897
mybatis-plus:
  global-config:
    db-config:
      logic-delete-field: deleted # 全局指定逻辑删除字段
      logic-delete-value: 1 # 逻辑删除后的值
      logic-not-delete-value: 0 # 没有删除的值
  configuration:
    default-enum-type-handler: org.apache.ibatis.type.EnumOrdinalTypeHandler # 通用枚举处理器
  #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志打印
  type-enums-package: com.monkeylessey.enums.general # 通用枚举所在包路径
  mapper-locations: classpath*:mapper/*.xml # mapper.xml位置
 
 
xp-start:
  security:
    session: false # 使用security + session
  use-tenant: true # 开启多租户
 
 
token:
  secret: fjgkgkgkkfldpeorit54ewsdsdyhtjghjtsdfggfhgh # token秘钥
  expire: 360  #有效时长,分钟(6小时)
  header: Authentication  # 放token的请求头字段
spring:
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher
  servlet:
    multipart:
      max-file-size: 1024MB
      max-request-size: 1024MB
  profiles:
    active: dev
  quartz: # 定时任务相关
    job-store-type: jdbc  # 保存到数据库
    jdbc:
      initialize-schema: never  # 第一次运行程序,设置为always。后面就设置为never。always会帮我们创建quartz的表,但是每次启动都会先删表再创表,导致程序启动很慢
    auto-startup: true  # 自动启动
    overwrite-existing-jobs: true  # 新配置的job会覆盖存在的job
    scheduler-name: xpstart  # 调度器名称
    startup-delay: 2  # 应用初始化完成后,调度器的启动延迟。如果在整个应用程序启动之前没有运行任何作业,则设置此属性是有意义的。
  task:
    execution:
      pool:
        allow-core-thread-timeout: true  # 允许核心线程超时,可以实现池的动态增长和收缩。
        core-size: 8  # 核心线程数
        max-size: 10  # 最大线程数
        queue-capacity: 3  # 等待队列的容量
        keep-alive: 60s  # 线程在终止之前可保持空闲的时间限制
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8
 
# 短信
sms:
  enable: true
 
# 微信支付
wxpay:
  enable: true
 
# aes加密
cipher:
  key: 0123456789abcdef
  iv: abcdef0123456789
 
# 阿里云oss
oss:
  endpoint: oss-cn-chengdu.aliyuncs.com  # oss地域节点
  stsEndpoint: sts.cn-chengdu.aliyuncs.com  # sts接入点,根据地域选择,参见:https://help.aliyun.com/document_detail/371859.html
  bucketName: xpstart-test  # 存储空间名
  AccessKeyId: LTAI5tPrWmmwzFDEoodNT5yZ  # RAM用户的AccessKeyId
  AccessKeySecret: amOpPLHeDHfnYDrUGAeYz8lyt3MkDX  # RAM用户的accessKeySecret
  roleArn: acs:ram::1750303759265748:role/ram-xp-base  # 角色ARN
  stsExpireTime: 3600  # sts临时访问凭证有效期,单位秒,范围900~43200,最大值由角色最大会话时间决定,参见:https://help.aliyun.com/document_detail/166256.htm?spm=a2c4g.11186623.0.0.58b04f77uvUaMl#task-2498608
  urlExpireTime: 3600  # 签名url有效期,单位秒, 如果使用了sts, 那么:0< 范围 < stsExpireTime,后端没用sts,所以返回的文件访问链接过期时间>0即可(其实还有阿里云过期时间戳最大值溢出的限制)
  roleSessionName: xpstart  # 自定义角色会话名称
  policy: {
    "Version": "1",
    "Statement": [
      {
        "Effect": "Allow",
        "Action": "oss:PutObject",
        "Resource": [
          "acs:oss:*:*:xpstart-test/*",
          "acs:oss:*:*:xpstart-test/exampledir/*"
        ]
      }
    ]
  }