baoshiwei
2025-05-06 8dd7af51db4cf768fbf92002b5b62f7fb9d1c929
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# 项目相关配置
base:
  # 名称
  name: admin
  # 版本
  version: 2.5.2
  # 版权年份
  copyrightYear: 2024
  profile: ./uploadPath
  # 获取ip地址开关
  addressEnabled: true
  # 验证码类型 math 数字计算 char 字符验证
  captchaType: math
  # 域名地址
  domainName: https://demo-ems.zhitancloud.com/prod-api
 
# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 8088
  servlet:
    # 应用的访问路径
    context-path: /
    # undertow 配置
  undertow:
    # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
    max-http-post-size: -1
    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
    # 每块buffer的空间大小,越小的空间被利用越充分
    buffer-size: 512
    # 是否分配的直接内存
    direct-buffers: true
    threads:
      # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
      io: 8
      # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
      worker: 256
 
# 日志配置
logging:
  level:
    com.zhitan: debug
    org.springframework: warn
 
# 用户配置
user:
  password:
    # 密码最大错误次数
    maxRetryCount: 5
    # 密码锁定时间(默认10分钟)
    lockTime: 10
 
# Spring配置
spring:
  # 资源信息
  messages:
    # 国际化资源文件路径
    basename: i18n/messages
  profiles:
    active: @profileActive@
  # 文件上传
  servlet:
    multipart:
      # 单个文件大小
      max-file-size: 10MB
      # 设置总上传的文件大小
      max-request-size: 20MB
  # 服务模块
  devtools:
    restart:
      # 热部署开关
      enabled: true
  # redis 配置
  redis:
    # 地址
    host: localhost
    # 端口,默认为6379
    port: 6379
    # 数据库索引
    database: 0
    # 密码
    password:
    # 连接超时时间
    timeout: 10s
    lettuce:
      pool:
        # 连接池中的最小空闲连接
        min-idle: 0
        # 连接池中的最大空闲连接
        max-idle: 8
        # 连接池的最大数据库连接数
        max-active: 8
        # #连接池最大阻塞等待时间(使用负值表示没有限制)
        max-wait: -1ms
 
# token配置
token:
  # 令牌自定义标识
  header: Authorization
  # 令牌密钥
  secret: abcdefghijklmnopqrstuvwxyzzhitancloud
  # 令牌有效期(默认30分钟)
  expireTime: 300
 
mybatis-plus:
  #  configuration:
  #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  typeAliasesPackage: com.zhitan.**.domain
  mapperLocations: classpath*:mapper/**/*Mapper.xml
  # 加载全局的配置文件
  configLocation: classpath:mybatis/mybatis-config.xml
 
# PageHelper分页插件
pagehelper:
  helperDialect: PostgreSQL
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql
  maxPageSize: 500
 
# Swagger配置
swagger:
  # 是否开启swagger
  enabled: true
  # 请求前缀
  pathMapping: /dev-api
 
# 防止XSS攻击
xss:
  # 过滤开关
  enabled: true
  # 排除链接(多个用逗号分隔)
  excludes: /system/notice
  # 匹配链接
  urlPatterns: /system/*,/monitor/*,/tool/*
 
# Shiro
shiro:
  session:
    # 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制)
    maxSession: 1
    # 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户
    kickoutAfter: false
rtdb:
  host: http://127.0.0.1:8086  # 用户名root 密码12345678
  #token: AminQagYp5rjb09mFPYvriK0T0vlF-zmwboqtUzdcq3nkXNuhnEpMuG_Ht5vtfWC4xBIVOThvoxy5reTer9XcQ==
  token: i8WwVZz3RvkEVF3qGaY8uIDXTFEe2PzjgrKebDzcxlYGKnR-kOK5Hf1S5G4z3p-lc9UO7MQS4qKGL4lIeHSw1A==
  org: lanbao
  bucket: nygl
  measurement: data
 
###################### MQTT #################################
mqtt:
  # 服务器地址
  host: tcp://lanpucloud.cn:1883
  # ID唯一
  clientId: MQTT_WK
  # 主题 多个主题用逗号(,)分割 #表示这个主题下面所有,topic1,topic2,topic2/topic22/#(默认会取第一个主题)
  topics: topic1
  # 用户名
  username: tongjitang
  # 密码
  password: 123456
  # 连接超时
  timeout: 30
  # 心跳检测
  keepalive: 60
  # 对消息处理的几种机制。
  # 0 表示的是订阅者没收到消息不会再次发送,消息会丢失
  # 1 表示的是会尝试重试,一直到接收到消息,但这种情况可能导致订阅者收到多次重复消息
  # 2 多了一次去重的动作,确保订阅者收到的消息有一次
  qos: 1
  # false为建立持久会话
  cleanSession: false
  # 断开后重新连接
  automaticReconnect: true
singleLoginUrl: localhost:8090/singleLogin/getInfo