houzhongjian
2024-08-02 4a47e4b93f62b5e636ac0e76f3e4ee98e2b83154
提交 | 用户 | 时间
d9f9ba 1 server:
H 2   port: 9090
3   servlet:
4     context-path: /xxl-job-admin
5
6 logging:
7   file:
4a47e4 8     name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径
d9f9ba 9
e7c126 10 spring:
d9f9ba 11   application:
H 12     name: xxl-job-server
13   profiles:
14     # 环境配置
15 #    active: @profiles.active@
4a47e4 16     active: @profiles.active@
H 17
18   cloud:
19     nacos:
20       server-addr: @nacos.server@ # Nacos 服务器地址
21       username: @nacos.username@
22       password: @nacos.password@
23       discovery: # 【配置中心】配置项
24         namespace: @profiles.active@  # 命名空间。这里使用 dev 开发环境
25         group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
26         metadata:
27           version: @nacos.metadata.version@ # 服务实例的版本号,可用于灰度发布
28           management.context-path: ${server.servlet.context-path}/actuator
29       config: # 【注册中心】配置项
30         namespace: @profiles.active@ # 命名空间。这里使用 dev 开发环境
31         group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
32
d9f9ba 33     # Spring Boot Admin 配置项
H 34     boot:
35       admin:
36         # Spring Boot Admin Client 客户端的相关配置
37         client:
38           instance:
39             service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
e7c126 40   mvc:
H 41     servlet:
42       load-on-startup: 0
43     static-path-pattern: /static/**
44   resources:
45     static-locations:classpath: /static/
46   freemarker:
47     templateLoaderPath:classpath: /templates/
48     suffix: .ftl
49     charset: UTF-8
50     request-context-attribute: request
51     settings:
52       number_format: 0.
53       new_builtin_class_resolver: safer
54   datasource:
d9f9ba 55     url: jdbc:mysql://172.16.8.100:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
e7c126 56     username: root
H 57     password: 123456
58     driver-class-name: com.mysql.cj.jdbc.Driver
59     type: com.zaxxer.hikari.HikariDataSource
60     hikari:
61       minimum-idle: 10
62       maximum-pool-size: 30
63       auto-commit: true
64       idle-timeout: 30000
65       pool-name: HikariCP
66       max-lifetime: 900000
67       connection-timeout: 10000
68       connection-test-query: SELECT 1
69       validation-timeout: 1000
70   mail:
71     host: smtp.qq.com
72     port: 25
73     username: 790219613@qq.com
74     from: xxx@qq.com
75     password: xxx
76     properties:
77       mail:
78         smtp:
79           auth: true
80           starttls:
81             enable: true
82             required: true
83           socketFactory:
84             class: javax.net.ssl.SSLSocketFactory
85
86 mybatis:
87   mapper-locations: classpath:/mybatis-mapper/*Mapper.xml
88 xxl:
89   job:
90     accessToken: default_token
91     i18n: zh_CN
92     triggerpool:
93       fast:
94         max: 200
95       slow:
96         max: 100
97     logretentiondays: 30
98
99 # 服务端点检查
100 management:
d9f9ba 101   server:
H 102     base-path: /actuator
103   health:
104     mail:
105       enabled: false
e7c126 106   trace:
H 107     http:
108       enabled: true
109   endpoints:
110     web:
111       exposure:
112         include: "*"
113   endpoint:
114     health:
115       show-details: always
116
117