Jay
2024-10-12 f6a1e4196efbddd6fc4bcf7191a5ccb30ccae946
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
server:
  port: 9090
  servlet:
    context-path: /xxl-job-admin
 
logging:
  file:
    name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径
 
spring:
  application:
    name: xxl-job-server
  profiles:
    # 环境配置
#    active: @profiles.active@
    active: @profiles.active@
 
  cloud:
    nacos:
      server-addr: @nacos.server@ # Nacos 服务器地址
      username: @nacos.username@
      password: @nacos.password@
      discovery: # 【配置中心】配置项
        namespace: @profiles.active@  # 命名空间。这里使用 dev 开发环境
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
        metadata:
          version: @nacos.metadata.version@ # 服务实例的版本号,可用于灰度发布
          management.context-path: ${server.servlet.context-path}/actuator
      config: # 【注册中心】配置项
        namespace: @profiles.active@ # 命名空间。这里使用 dev 开发环境
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
 
    # Spring Boot Admin 配置项
    boot:
      admin:
        # Spring Boot Admin Client 客户端的相关配置
        client:
          instance:
            service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
  mvc:
    servlet:
      load-on-startup: 0
    static-path-pattern: /static/**
  resources:
    static-locations:classpath: /static/
  freemarker:
    templateLoaderPath:classpath: /templates/
    suffix: .ftl
    charset: UTF-8
    request-context-attribute: request
    settings:
      number_format: 0.
      new_builtin_class_resolver: safer
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
    username: root
    password: 123456
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.zaxxer.hikari.HikariDataSource
    hikari:
      minimum-idle: 10
      maximum-pool-size: 30
      auto-commit: true
      idle-timeout: 30000
      pool-name: HikariCP
      max-lifetime: 900000
      connection-timeout: 10000
      connection-test-query: SELECT 1
      validation-timeout: 1000
  mail:
    host: smtp.qq.com
    port: 25
    username: 790219613@qq.com
    from: xxx@qq.com
    password: xxx
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true
            required: true
          socketFactory:
            class: javax.net.ssl.SSLSocketFactory
 
mybatis:
  mapper-locations: classpath:/mybatis-mapper/*Mapper.xml
xxl:
  job:
    accessToken: default_token
    i18n: zh_CN
    triggerpool:
      fast:
        max: 200
      slow:
        max: 100
    logretentiondays: 30
 
# 服务端点检查
management:
  server:
    base-path: /actuator
  health:
    mail:
      enabled: false
  trace:
    http:
      enabled: true
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: always