Compare commits
8 Commits
1070b63787
...
4b47d06727
Author | SHA1 | Date | |
---|---|---|---|
4b47d06727 | |||
514a14df8c | |||
5adf95ffd0 | |||
bfa7d6f59b | |||
ad2bb1acbe | |||
93c15f97a0 | |||
c3026428fa | |||
335aa0daee |
@ -98,6 +98,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|||||||
|
|
||||||
- cd /root/ludu-cloud
|
- cd /root/ludu-cloud
|
||||||
- git pull origin master
|
- git pull origin master
|
||||||
|
- rm -f ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/framework/nacos/config/BeanInit.java
|
||||||
- mvn package -Dmaven.test.skip=true
|
- mvn package -Dmaven.test.skip=true
|
||||||
- port=48092 # 指定端口号
|
- port=48092 # 指定端口号
|
||||||
- pid=$(lsof -t -i:$port) # 获取占用指定端口的进程号
|
- pid=$(lsof -t -i:$port) # 获取占用指定端口的进程号
|
||||||
|
@ -1,153 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
### datasource-pool
|
|
||||||
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
|
|
||||||
### xxl-job, email
|
|
||||||
mail:
|
|
||||||
host: smtp.qq.com
|
|
||||||
port: 25
|
|
||||||
username: xxx@qq.com
|
|
||||||
from: xxx@qq.com
|
|
||||||
password: xxx
|
|
||||||
properties:
|
|
||||||
mail:
|
|
||||||
smtp:
|
|
||||||
auth: true
|
|
||||||
starttls:
|
|
||||||
enable: true
|
|
||||||
required: true
|
|
||||||
socketFactory:
|
|
||||||
class: javax.net.ssl.SSLSocketFactory
|
|
||||||
|
|
||||||
### xxl-job, access token
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
accessToken:
|
|
||||||
### xxl-job, i18n (default is zh_CN, and you can choose "zh_CN", "zh_TC" and "en")
|
|
||||||
i18n: zh_CN
|
|
||||||
## xxl-job, triggerpool max size
|
|
||||||
triggerpool:
|
|
||||||
fast:
|
|
||||||
max: 200
|
|
||||||
slow:
|
|
||||||
max: 100
|
|
||||||
### xxl-job, log retention days
|
|
||||||
logretentiondays: 30
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,93 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
|
||||||
### resources
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
|
||||||
servlet:
|
|
||||||
load-on-startup: 0
|
|
||||||
static-path-pattern: /static/**
|
|
||||||
web:
|
|
||||||
resources:
|
|
||||||
static-locations: classpath:/static/
|
|
||||||
### fremarker
|
|
||||||
freemarker:
|
|
||||||
template-loader-path: classpath:/templates/
|
|
||||||
suffix: .ftl
|
|
||||||
charset: utf-8
|
|
||||||
request-context-attribute: request
|
|
||||||
settings:
|
|
||||||
number_format: 0.##########
|
|
||||||
new_builtin_class_resolver: safer
|
|
||||||
# Jackson 配置项
|
|
||||||
jackson:
|
|
||||||
serialization:
|
|
||||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
||||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
||||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
||||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
||||||
|
|
||||||
### actuator
|
|
||||||
management:
|
|
||||||
health:
|
|
||||||
mail:
|
|
||||||
enabled: false
|
|
||||||
server:
|
|
||||||
base-path: /actuator
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- #################### 接口文档配置 ####################
|
|
||||||
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# MyBatis Plus 的配置项
|
|
||||||
mybatis-plus:
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
|
||||||
global-config:
|
|
||||||
db-config:
|
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
|
||||||
encryptor:
|
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
|
||||||
mapper-locations: classpath:/mybatis-mapper/*Mapper.xml
|
|
||||||
|
|
||||||
mybatis-plus-join:
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
|
|
||||||
|
|
||||||
# VO 转换(数据翻译)相关
|
|
||||||
easy-trans:
|
|
||||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
|
||||||
is-enable-cloud: false # 禁用 TransType.RPC 微服务模式
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
||||||
base-package: com.xxl.job.admin
|
|
||||||
swagger:
|
|
||||||
title: 管理后台
|
|
||||||
description: 提供管理员管理的所有功能
|
|
||||||
version: ${yudao.info.version}
|
|
||||||
base-package: ${yudao.info.base-package}
|
|
||||||
captcha:
|
|
||||||
enable: true # 验证码的开关,默认为 true;
|
|
||||||
|
|
||||||
debug: false
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,7 +1,8 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: job-server
|
name: job-server
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
@ -14,3 +15,27 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
|
||||||
|
--- #################### 配置中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||||
|
config:
|
||||||
|
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
||||||
|
|
||||||
|
@ -33,12 +33,29 @@
|
|||||||
<artifactId>yudao-spring-boot-starter-env</artifactId>
|
<artifactId>yudao-spring-boot-starter-env</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
|
<artifactId>yudao-module-system-api</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
|
<artifactId>yudao-module-infra-api</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 业务组件 -->
|
<!-- 业务组件 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.iocoder.cloud</groupId>
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
<artifactId>yudao-spring-boot-starter-biz-tenant</artifactId>
|
<artifactId>yudao-spring-boot-starter-biz-tenant</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Web 相关 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
|
<artifactId>yudao-spring-boot-starter-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@ -56,6 +73,11 @@
|
|||||||
<artifactId>yudao-spring-boot-starter-redis</artifactId>
|
<artifactId>yudao-spring-boot-starter-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RPC 远程调用相关 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
|
<artifactId>yudao-spring-boot-starter-rpc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Registry 注册中心相关 -->
|
<!-- Registry 注册中心相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -20,15 +20,19 @@ import java.util.Map;
|
|||||||
public class CheckTicketApi {
|
public class CheckTicketApi {
|
||||||
@Resource
|
@Resource
|
||||||
private CheckTicketService checkTicketService;
|
private CheckTicketService checkTicketService;
|
||||||
@GetMapping("/{day}")
|
@GetMapping()
|
||||||
@Operation(summary = "获得日期当天的检票人数")
|
@Operation(summary = "获得日期当天的检票人数")
|
||||||
public Long checkTicketTotal(@PathVariable("day") String day) {
|
public Long checkTicketTotal(String starTime, String endTime) {
|
||||||
return checkTicketService.checkTicketTotal(day);
|
String replace = starTime.replace("-", "");
|
||||||
|
String replace1 = endTime.replace("-", "");
|
||||||
|
return checkTicketService.checkTicketTotal(replace,replace1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/qushi/{day}")
|
@GetMapping("/qushi")
|
||||||
@Operation(summary = "获取日期当天各个时段的检票人数")
|
@Operation(summary = "获取日期当天各个时段的检票人数")
|
||||||
public List<Map<String, String>> findbytimetemp(@PathVariable("day") String day) {
|
public List<Map<String, String>> findbytimetemp(String starTime, String endTime) {
|
||||||
return checkTicketService.findbytimetemp(day);
|
String replace = starTime.replace("-", "");
|
||||||
|
String replace1 = endTime.replace("-", "");
|
||||||
|
return checkTicketService.findbytimetemp(replace,replace1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,89 +27,76 @@ public class SaleDataApi {
|
|||||||
@Resource
|
@Resource
|
||||||
private SaleDataService saleDataService;
|
private SaleDataService saleDataService;
|
||||||
|
|
||||||
@GetMapping("/{day}")
|
@GetMapping()
|
||||||
@Operation(summary = "获得输入日期的当天总售票数")
|
@Operation(summary = "获得输入日期的当天总售票数")
|
||||||
public Long checkTicketTotal(@PathVariable("day") String day) {
|
public Long checkTicketTotal(String starTime, String endTime) {
|
||||||
return saleDataService.countBySddate(day);
|
String replace = starTime.replace("-", "");
|
||||||
|
String replace1 = endTime.replace("-", "");
|
||||||
|
return saleDataService.countBySddate(replace, replace1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/thisyear/{startTime}")
|
@GetMapping("/thisyear")
|
||||||
@Operation(summary = "获得今年日期往前十天内的数据")
|
@Operation(summary = "获得今年日期往前十天内的数据")
|
||||||
public List<Map<String, String>> thisyearNum(@PathVariable("startTime") String startTime) {
|
public List<Map<String, String>> thisyearNum(String starTime, String endTime) {
|
||||||
return saleDataService.findCheckticketcountBytime(startTime);
|
String replace = starTime.replace("-", "");
|
||||||
|
String replace1 = endTime.replace("-", "");
|
||||||
|
return saleDataService.findCheckticketcountBytime(replace, replace1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/lastyear/{startTime}")
|
@GetMapping("/lastyear")
|
||||||
@Operation(summary = "获得去年日期往前推十天的数据")
|
@Operation(summary = "获得去年日期往前推十天的数据")
|
||||||
public List<Map<String, String>> lastyearNum(@PathVariable("startTime") String startTime) {
|
public List<Map<String, String>> lastyearNum(String starTime, String endTime) {
|
||||||
String resultStr = startTime.replaceAll("-", "");
|
String replace = starTime.replace("-", "");
|
||||||
// 正则表达式匹配 yyyyMMdd 格式
|
String replace1 = endTime.replace("-", "");
|
||||||
Pattern pattern = Pattern.compile("^\\d{8}$");
|
return saleDataService.findCheckticketcountBytime(replace, replace1);
|
||||||
Matcher matcher = pattern.matcher(resultStr);
|
|
||||||
if (matcher.matches()){
|
|
||||||
return saleDataService.findCheckticketcountBytime(resultStr);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/gender")
|
@GetMapping("/gender")
|
||||||
@Operation(summary = "获得所有数据的男女数量")
|
@Operation(summary = "获得所有数据的男女数量")
|
||||||
public List<Map<String, String>> findByGender(String starTime, String endTime) {
|
public List<Map<String, String>> findByGender(String starTime, String endTime) {
|
||||||
if (starTime != null && endTime != null){
|
String replace = starTime.replace("-", "");
|
||||||
String replace = starTime.replace("-", "");
|
String replace1 = endTime.replace("-", "");
|
||||||
String replace1 = endTime.replace("-", "");
|
return saleDataService.findByGender(replace, replace1);
|
||||||
return saleDataService.findByGender(replace, replace1);
|
|
||||||
}else{
|
|
||||||
return saleDataService.findByGender(starTime, endTime);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/age")
|
@GetMapping("/age")
|
||||||
@Operation(summary = "获得所有数据的年龄分段和数量")
|
@Operation(summary = "获得所有数据的年龄分段和数量")
|
||||||
public List<Map<String, String>> findByage(String starTime, String endTime) {
|
public List<Map<String, String>> findByage(String starTime, String endTime) {
|
||||||
if (starTime != null && endTime != null){
|
String replace = starTime.replace("-", "");
|
||||||
String replace = starTime.replace("-", "");
|
String replace1 = endTime.replace("-", "");
|
||||||
String replace1 = endTime.replace("-", "");
|
return saleDataService.findByAge(replace, replace1);
|
||||||
return saleDataService.findByAge(replace, replace1);
|
|
||||||
}else{
|
|
||||||
return saleDataService.findByAge(starTime, endTime);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/lastyear/region")
|
@GetMapping("/lastyear/region")
|
||||||
@Operation(summary = "查询去年各个省份的人数")
|
@Operation(summary = "查询去年各个省份的人数")
|
||||||
public List<Map<String, String>> lastyearfindByregion() {
|
public List<Map<String, String>> lastyearfindByregion(String starTime, String endTime) {
|
||||||
return saleDataService.findByregion(saleDataService.findEventsLastYear());
|
String replace = starTime.replace("-", "");
|
||||||
|
String replace1 = endTime.replace("-", "");
|
||||||
|
return saleDataService.findByregion(saleDataService.findEventsLastYear(replace, replace1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/thisyear/region")
|
@GetMapping("/thisyear/region")
|
||||||
@Operation(summary = "查询今年各个省份的人数")
|
@Operation(summary = "查询今年各个省份的人数")
|
||||||
public List<Map<String, String>> thisyearfindByregion() {
|
public List<Map<String, String>> thisyearfindByregion(String starTime, String endTime) {
|
||||||
return saleDataService.findByregion(saleDataService.findEventsThisYear());
|
String replace = starTime.replace("-", "");
|
||||||
|
String replace1 = endTime.replace("-", "");
|
||||||
|
return saleDataService.findByregion(saleDataService.findEventsThisYear(replace, replace1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/salemethod")
|
@GetMapping("/salemethod")
|
||||||
@Operation(summary = "查询各个销售渠道的购票人数")
|
@Operation(summary = "查询各个销售渠道的购票人数")
|
||||||
public List<Map<String, String>> findBysaleMethod(String starTime, String endTime) {
|
public List<Map<String, String>> findBysaleMethod(String starTime, String endTime) {
|
||||||
if (starTime != null && endTime != null){
|
String replace = starTime.replace("-", "");
|
||||||
String replace = starTime.replace("-", "");
|
String replace1 = endTime.replace("-", "");
|
||||||
String replace1 = endTime.replace("-", "");
|
return saleDataService.findBySaleMethod(replace, replace1);
|
||||||
return saleDataService.findBySaleMethod(replace, replace1);
|
|
||||||
}else{
|
|
||||||
return saleDataService.findBySaleMethod(starTime, endTime);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/itemType")
|
@GetMapping("/itemType")
|
||||||
@Operation(summary = "查询各个产品类型的购票人数")
|
@Operation(summary = "查询各个产品类型的购票人数")
|
||||||
public List<Map<String, String>> findByItemType(String starTime, String endTime) {
|
public List<Map<String, String>> findByItemType(String starTime, String endTime) {
|
||||||
if (starTime != null && endTime != null){
|
String replace = starTime.replace("-", "");
|
||||||
String replace = starTime.replace("-", "");
|
String replace1 = endTime.replace("-", "");
|
||||||
String replace1 = endTime.replace("-", "");
|
return saleDataService.findByDoItemType(replace, replace1);
|
||||||
return saleDataService.findByDoItemType(replace, replace1);
|
|
||||||
}else{
|
|
||||||
return saleDataService.findByDoItemType(starTime, endTime);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/wuyi/{x}")
|
@GetMapping("/wuyi/{x}")
|
||||||
@ -140,6 +127,8 @@ public class SaleDataApi {
|
|||||||
@GetMapping("/thisyear/nianjun")
|
@GetMapping("/thisyear/nianjun")
|
||||||
@Operation(summary = "查询今年年度售票平均金额")
|
@Operation(summary = "查询今年年度售票平均金额")
|
||||||
public BigDecimal findmoneythisyear() {
|
public BigDecimal findmoneythisyear() {
|
||||||
|
// String replace = starTime.replace("-", "");
|
||||||
|
// String replace1 = endTime.replace("-", "");
|
||||||
return saleDataService.findyearJun(saleDataService.findEventsThisYear());
|
return saleDataService.findyearJun(saleDataService.findEventsThisYear());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,10 +14,14 @@ public interface CheckTicketRepository extends MongoRepository<CheckTicket,Strin
|
|||||||
@Query("{'name': {'$regex': '?0', '$options': 'i'}}")
|
@Query("{'name': {'$regex': '?0', '$options': 'i'}}")
|
||||||
Page<CheckTicket> findByName(String q, PageRequest pageable);
|
Page<CheckTicket> findByName(String q, PageRequest pageable);
|
||||||
|
|
||||||
int countByCheckticketdate(String day);
|
@Query("{'checkticketdate':{'$gte': ?0, '$lt': ?1}}")
|
||||||
|
List<CheckTicket> countByCheckticketdateBetween(String starTime, String endTime);
|
||||||
|
|
||||||
@Query("{'checktickettime':{'$gte': ?0, '$lt': ?1},'checkticketdate':{'$dt': ?2}}")
|
@Query("{'checktickettime':{'$gte': ?0, '$lt': ?1},'checkticketdate':{'$dt': ?2}}")
|
||||||
List<CheckTicket> findByTimestampBetweenAndCheckticketdate(String startTime, String endTime,String day);
|
List<CheckTicket> findByTimestampBetweenAndCheckticketdate(String startTime, String endTime,String day);
|
||||||
|
|
||||||
List<CheckTicket>findByCheckticketdateAndChecktickettimeBetween(String day,String startTime, String endTime);
|
List<CheckTicket> findByCheckticketdateAndChecktickettimeBetween(String day,String startTime, String endTime);
|
||||||
|
|
||||||
|
@Query("{'checkticketdate':{'$gte': ?0, '$lt': ?1} , 'checktickettime':{'$gte': ?2, '$lt': ?3}}")
|
||||||
|
List<CheckTicket> findByCheckticketdateBetweenAndChecktickettimeBetween(String startTime, String endTime,String beingTime, String resultTime);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@ public interface SaleDataRepository extends MongoRepository<SaleData,String> {
|
|||||||
Page<SaleData> findByName(String q, PageRequest pageable);*/
|
Page<SaleData> findByName(String q, PageRequest pageable);*/
|
||||||
int countBySddate(String day);
|
int countBySddate(String day);
|
||||||
|
|
||||||
|
@Query(value = "{'sddate': { $gte: ?0, $lt: ?1 }}", fields = "{ 'sddate': 1 }")
|
||||||
|
List<String> countBySddateToTime(String starTime, String endTime);
|
||||||
|
|
||||||
|
|
||||||
// @Query("{ 'sddate' : { $gte: ?0, $lte: ?1 } }")
|
// @Query("{ 'sddate' : { $gte: ?0, $lte: ?1 } }")
|
||||||
@Query(value = "{ 'sddate': { $gte: ?0, $lte: ?1 } }", fields = "{ 'certificateno': 1, 'amount': 1}")
|
@Query(value = "{ 'sddate': { $gte: ?0, $lte: ?1 } }", fields = "{ 'certificateno': 1, 'amount': 1}")
|
||||||
@ -59,6 +62,6 @@ public interface SaleDataRepository extends MongoRepository<SaleData,String> {
|
|||||||
List<SaleDataItemTypeVo> findAllByItemtypenameTime(String starTime, String endTime);
|
List<SaleDataItemTypeVo> findAllByItemtypenameTime(String starTime, String endTime);
|
||||||
|
|
||||||
@Query(value = "{'sddate': { $gte: ?0, $lt: ?1 }}", fields = "{ 'transactiontypeno': 1 }")
|
@Query(value = "{'sddate': { $gte: ?0, $lt: ?1 }}", fields = "{ 'transactiontypeno': 1 }")
|
||||||
List<String> findAllByTransactiontypenoTime(String starTime, String endTime);
|
List<SaleData> findAllByTransactiontypenoTime(String starTime, String endTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.datacenter.framework.nacos.config;
|
package cn.iocoder.yudao.module.datacenter.framework.nacos.config;
|
||||||
|
|
||||||
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
@ -13,15 +14,19 @@ public class BeanInit {
|
|||||||
/**
|
/**
|
||||||
* 用于改变程序自动获取的本机ip
|
* 用于改变程序自动获取的本机ip
|
||||||
*/
|
*/
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String activeEnv;
|
||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
public NacosDiscoveryProperties nacosProperties() throws UnknownHostException {
|
public NacosDiscoveryProperties nacosProperties() throws UnknownHostException {
|
||||||
NacosDiscoveryProperties nacosDiscoveryProperties = new NacosDiscoveryProperties();
|
NacosDiscoveryProperties nacosDiscoveryProperties = new NacosDiscoveryProperties();
|
||||||
// 直接指定域名
|
if ("dev".equals(activeEnv)){
|
||||||
String customIp = "120.46.37.243"; // 替换为你的域名
|
// 直接指定域名
|
||||||
int customPort = 9091; // 替换为你的端口
|
String customIp = "120.46.37.243"; // 替换为你的域名
|
||||||
nacosDiscoveryProperties.setIp(customIp );
|
int customPort = 9091; // 替换为你的端口
|
||||||
nacosDiscoveryProperties.setPort(customPort);
|
nacosDiscoveryProperties.setIp(customIp);
|
||||||
|
nacosDiscoveryProperties.setPort(customPort);
|
||||||
|
}
|
||||||
return nacosDiscoveryProperties;
|
return nacosDiscoveryProperties;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,15 +14,15 @@ public interface CheckTicketService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取日期当天各个时段的检票人数
|
* 获取日期当天各个时段的检票人数
|
||||||
* @param day
|
* @param starTime
|
||||||
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||||
*/
|
*/
|
||||||
public List<Map<String, String>> findbytimetemp(String day);
|
public List<Map<String, String>> findbytimetemp(String starTime, String endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得日期当天的检票人数
|
* 获得日期当天的检票人数
|
||||||
* @param day 日期
|
* @param starTime 日期
|
||||||
* @return long 检票人数
|
* @return long 检票人数
|
||||||
*/
|
*/
|
||||||
public long checkTicketTotal(String day);
|
public long checkTicketTotal(String starTime, String endTime);
|
||||||
}
|
}
|
@ -2,12 +2,14 @@ package cn.iocoder.yudao.module.datacenter.service.checkticket;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.datacenter.controller.app.saledata.vo.AggregationVO;
|
||||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.checkticket.CheckTicket;
|
import cn.iocoder.yudao.module.datacenter.dal.dataobject.checkticket.CheckTicket;
|
||||||
import cn.iocoder.yudao.module.datacenter.dal.mongodb.checkticket.CheckTicketRepository;
|
import cn.iocoder.yudao.module.datacenter.dal.mongodb.checkticket.CheckTicketRepository;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -31,7 +33,7 @@ public class CheckTicketServiceImpl implements CheckTicketService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, String>> findbytimetemp(String day) {
|
public List<Map<String, String>> findbytimetemp(String starTime, String endTime) {
|
||||||
LocalDateTime startTime = LocalDateTime.now();
|
LocalDateTime startTime = LocalDateTime.now();
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
|
||||||
List<Map<String, String>> mapList = new ArrayList<>();
|
List<Map<String, String>> mapList = new ArrayList<>();
|
||||||
@ -41,9 +43,14 @@ public class CheckTicketServiceImpl implements CheckTicketService {
|
|||||||
LocalDateTime hourStartTime = startTime.withHour(i).withMinute(0).withSecond(0).withNano(0);
|
LocalDateTime hourStartTime = startTime.withHour(i).withMinute(0).withSecond(0).withNano(0);
|
||||||
LocalDateTime hourEndTime = hourStartTime.plusHours(1);
|
LocalDateTime hourEndTime = hourStartTime.plusHours(1);
|
||||||
String begintime = formatter.format(hourStartTime);
|
String begintime = formatter.format(hourStartTime);
|
||||||
String endtime = formatter.format(hourEndTime);
|
String resulttime = formatter.format(hourEndTime);
|
||||||
List<CheckTicket> checkTickets = checkTicketRepository.findByCheckticketdateAndChecktickettimeBetween(day,begintime,endtime);
|
List<CheckTicket> checkTickets;
|
||||||
map.put("date",begintime+"-"+endtime);
|
if (starTime != null && endTime != null && starTime.equals(endTime)){
|
||||||
|
checkTickets = checkTicketRepository.findByCheckticketdateAndChecktickettimeBetween(starTime,begintime,resulttime);
|
||||||
|
}else {
|
||||||
|
checkTickets = checkTicketRepository.findByCheckticketdateBetweenAndChecktickettimeBetween(starTime,endTime,begintime,resulttime);
|
||||||
|
}
|
||||||
|
map.put("date",begintime+"-"+resulttime);
|
||||||
map.put("count", String.valueOf(checkTickets.stream().count()));
|
map.put("count", String.valueOf(checkTickets.stream().count()));
|
||||||
mapList.add(map);
|
mapList.add(map);
|
||||||
}
|
}
|
||||||
@ -52,8 +59,17 @@ public class CheckTicketServiceImpl implements CheckTicketService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long checkTicketTotal(String day) {
|
public long checkTicketTotal(String starTime, String endTime) {
|
||||||
return checkTicketRepository.countByCheckticketdate(day);
|
// 创建 DateTimeFormatter 实例以解析指定日期的格式
|
||||||
|
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
// 解析指定日期字符串为 LocalDate 对象
|
||||||
|
LocalDate specifiedDate = LocalDate.parse(endTime, inputFormatter);
|
||||||
|
// 获取指定日期的下一天
|
||||||
|
LocalDate nextDay = specifiedDate.plusDays(1);
|
||||||
|
// 格式化指定日期和下一天
|
||||||
|
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
String formattedNextDay = nextDay.format(outputFormatter);
|
||||||
|
return checkTicketRepository.countByCheckticketdateBetween(starTime,formattedNextDay).size();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -18,14 +18,14 @@ public interface SaleDataService {
|
|||||||
* @param day 日期
|
* @param day 日期
|
||||||
* @return 当天总售票数
|
* @return 当天总售票数
|
||||||
*/
|
*/
|
||||||
public long countBySddate(String day);
|
public long countBySddate(String starTime, String endTime);
|
||||||
/**
|
/**
|
||||||
* 日期往前十天内的数据
|
* 日期往前十天内的数据
|
||||||
* @param startTime 起始日期
|
* @param starTime 起始日期
|
||||||
* @return java.util.List<java.util.Map>
|
* @return java.util.List<java.util.Map>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public List<Map<String,String>> findCheckticketcountBytime(String startTime);
|
public List<Map<String,String>> findCheckticketcountBytime(String starTime, String endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询男女人数
|
* 查询男女人数
|
||||||
@ -44,11 +44,13 @@ public interface SaleDataService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SaleData> findEventsLastYear();
|
public List<SaleData> findEventsLastYear();
|
||||||
|
public List<SaleData> findEventsLastYear(String starTime, String endTime);
|
||||||
/**
|
/**
|
||||||
* 查询今年1月1日到12月31日的全部数据
|
* 查询今年1月1日到12月31日的全部数据
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SaleData> findEventsThisYear();
|
public List<SaleData> findEventsThisYear();
|
||||||
|
public List<SaleData> findEventsThisYear(String starTime, String endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询各个省份和人数
|
* 查询各个省份和人数
|
||||||
|
@ -33,30 +33,48 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SaleDataRepository saleDataRepository;
|
private SaleDataRepository saleDataRepository;
|
||||||
@Override
|
|
||||||
public long countBySddate(String day) {
|
public String publicMethod(String endTime){
|
||||||
return saleDataRepository.countBySddate(day);
|
// 创建 DateTimeFormatter 实例以解析指定日期的格式
|
||||||
|
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
// 解析指定日期字符串为 LocalDate 对象
|
||||||
|
LocalDate specifiedDate = LocalDate.parse(endTime, inputFormatter);
|
||||||
|
// 获取指定日期的下一天
|
||||||
|
LocalDate nextDay = specifiedDate.plusDays(1);
|
||||||
|
// 格式化指定日期和下一天
|
||||||
|
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
String formattedNextDay = nextDay.format(outputFormatter);
|
||||||
|
return formattedNextDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String,String>> findCheckticketcountBytime(String startTime) {
|
public long countBySddate(String starTime, String endTime) {
|
||||||
|
return saleDataRepository.countBySddateToTime(starTime, this.publicMethod(endTime)).size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String,String>> findCheckticketcountBytime(String starTime, String endTime) {
|
||||||
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
Calendar calendar2 = Calendar.getInstance();
|
||||||
Date date1= null;
|
Date date1= null;
|
||||||
|
Date date2= null;
|
||||||
try {
|
try {
|
||||||
date1 = inputFormat.parse(startTime);
|
date1 = inputFormat.parse(starTime);
|
||||||
|
date2 = inputFormat.parse(endTime);
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
calendar.setTime(date1);
|
calendar.setTime(date1);
|
||||||
calendar.add(Calendar.DAY_OF_YEAR, -9);
|
calendar2.setTime(date2);
|
||||||
|
// calendar.add(Calendar.DAY_OF_YEAR, -9);
|
||||||
List<Map<String,String>>map = new ArrayList<>();
|
List<Map<String,String>>map = new ArrayList<>();
|
||||||
while (!calendar.getTime().after(date1)){
|
while (!calendar.getTime().after(date2)){
|
||||||
Map<String,String>map1= new HashMap<>();
|
Map<String,String>map1= new HashMap<>();
|
||||||
String date = inputFormat.format(calendar.getTime());
|
String date = inputFormat.format(calendar.getTime());
|
||||||
map1.put("date",outputFormat.format(calendar.getTime()));
|
map1.put("date",outputFormat.format(calendar.getTime()));
|
||||||
map1.put("count", String.valueOf(this.countBySddate(date)));
|
map1.put("count", String.valueOf(saleDataRepository.countBySddate(date)));
|
||||||
map.add(map1);
|
map.add(map1);
|
||||||
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
||||||
}
|
}
|
||||||
@ -65,19 +83,7 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, String>> findByGender(String starTime, String endTime) {
|
public List<Map<String, String>> findByGender(String starTime, String endTime) {
|
||||||
AggregationVO allByCertificateno;
|
AggregationVO allByCertificateno = saleDataRepository.findAllByCertificatenoSDTime(starTime, this.publicMethod(endTime));
|
||||||
if (starTime == null || endTime == null){
|
|
||||||
// 获取当前日期
|
|
||||||
LocalDate currentDate = LocalDate.now();
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
||||||
String formattedDate = currentDate.format(formatter);
|
|
||||||
// 将当前日期加一天
|
|
||||||
LocalDate nextDay = currentDate.plusDays(1);
|
|
||||||
String nextDayFormatter = nextDay.format(formatter);
|
|
||||||
allByCertificateno = saleDataRepository.findAllByCertificatenoSDTime(formattedDate, nextDayFormatter);
|
|
||||||
}else {
|
|
||||||
allByCertificateno = saleDataRepository.findAllByCertificatenoSDTime(starTime, endTime);
|
|
||||||
}
|
|
||||||
List<Map<String, String>> map = new ArrayList<>();
|
List<Map<String, String>> map = new ArrayList<>();
|
||||||
Map<String,String>map1=new HashMap<>();
|
Map<String,String>map1=new HashMap<>();
|
||||||
Map<String,String>map2=new HashMap<>();
|
Map<String,String>map2=new HashMap<>();
|
||||||
@ -92,19 +98,7 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, String>> findByAge(String starTime, String endTime) {
|
public List<Map<String, String>> findByAge(String starTime, String endTime) {
|
||||||
AgeVo byAge;
|
AgeVo byAge = saleDataRepository.findByAge(starTime,this.publicMethod(endTime));
|
||||||
if (starTime == null || endTime == null){
|
|
||||||
// 获取当前日期
|
|
||||||
LocalDate currentDate = LocalDate.now();
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
||||||
String formattedDate = currentDate.format(formatter);
|
|
||||||
// 将当前日期加一天
|
|
||||||
LocalDate nextDay = currentDate.plusDays(1);
|
|
||||||
String nextDayFormatter = nextDay.format(formatter);
|
|
||||||
byAge = saleDataRepository.findByAge(formattedDate,nextDayFormatter);
|
|
||||||
}else {
|
|
||||||
byAge = saleDataRepository.findByAge(starTime,endTime);
|
|
||||||
}
|
|
||||||
List<Map<String,String>>map=new ArrayList<>();
|
List<Map<String,String>>map=new ArrayList<>();
|
||||||
Map<String,String>map1=new LinkedHashMap<>();
|
Map<String,String>map1=new LinkedHashMap<>();
|
||||||
Map<String,String>map2=new LinkedHashMap<>();
|
Map<String,String>map2=new LinkedHashMap<>();
|
||||||
@ -145,6 +139,16 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
return saleDataRepository.findBySddateBetween(start, end);
|
return saleDataRepository.findBySddateBetween(start, end);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public List<SaleData> findEventsLastYear(String starTime, String endTime) {
|
||||||
|
// DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
// LocalDate lastYear = LocalDate.now().minusYears(1);
|
||||||
|
// LocalDate startOfYear = lastYear.withDayOfYear(1);
|
||||||
|
// LocalDate endOfYear = lastYear.withDayOfYear(lastYear.lengthOfYear());
|
||||||
|
// String start = date.format(startOfYear);
|
||||||
|
// String end = date.format(endOfYear);
|
||||||
|
return saleDataRepository.findBySddateBetween(starTime, endTime);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public List<SaleData> findEventsThisYear() {
|
public List<SaleData> findEventsThisYear() {
|
||||||
DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyyMMdd");
|
DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
LocalDate thisYear = LocalDate.now().minusYears(0);
|
LocalDate thisYear = LocalDate.now().minusYears(0);
|
||||||
@ -154,6 +158,16 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
String end = date.format(endOfYear);
|
String end = date.format(endOfYear);
|
||||||
return saleDataRepository.findBySddateBetween(start,end);
|
return saleDataRepository.findBySddateBetween(start,end);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public List<SaleData> findEventsThisYear(String starTime, String endTime) {
|
||||||
|
// DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
// LocalDate thisYear = LocalDate.now().minusYears(0);
|
||||||
|
// LocalDate startOfYear = thisYear.withDayOfYear(1);
|
||||||
|
// LocalDate endOfYear = thisYear.withDayOfYear(thisYear.lengthOfYear());
|
||||||
|
// String start = date.format(startOfYear);
|
||||||
|
// String end = date.format(endOfYear);
|
||||||
|
return saleDataRepository.findBySddateBetween(starTime,endTime);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, String>> findByregion(List<SaleData> list) {
|
public List<Map<String, String>> findByregion(List<SaleData> list) {
|
||||||
@ -198,24 +212,12 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, String>> findBySaleMethod(String starTime, String endTime) {
|
public List<Map<String, String>> findBySaleMethod(String starTime, String endTime) {
|
||||||
List<String> saleDataList;
|
List<SaleData> saleDataList = saleDataRepository.findAllByTransactiontypenoTime(starTime, this.publicMethod(endTime));
|
||||||
if (starTime == null || endTime == null){
|
|
||||||
// 获取当前日期
|
|
||||||
LocalDate currentDate = LocalDate.now();
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
||||||
String formattedDate = currentDate.format(formatter);
|
|
||||||
// 将当前日期加一天
|
|
||||||
LocalDate nextDay = currentDate.plusDays(1);
|
|
||||||
String nextDayFormatter = nextDay.format(formatter);
|
|
||||||
saleDataList = saleDataRepository.findAllByTransactiontypenoTime(formattedDate, nextDayFormatter);
|
|
||||||
}else {
|
|
||||||
saleDataList = saleDataRepository.findAllByTransactiontypenoTime(starTime, endTime);
|
|
||||||
}
|
|
||||||
int[] saleMethodCounts = new int[5];
|
int[] saleMethodCounts = new int[5];
|
||||||
Map<String,String>map=new LinkedHashMap<>();
|
Map<String,String>map=new LinkedHashMap<>();
|
||||||
for (String saleData : saleDataList) {
|
for (SaleData saleData : saleDataList) {
|
||||||
// String transactiontypeno = saleData.getTransactiontypeno();
|
String transactiontypeno = saleData.getTransactiontypeno();
|
||||||
switch (saleData){
|
switch (transactiontypeno){
|
||||||
case "SD01":
|
case "SD01":
|
||||||
saleMethodCounts[0]++;
|
saleMethodCounts[0]++;
|
||||||
break;
|
break;
|
||||||
@ -252,19 +254,7 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, String>> findByDoItemType(String starTime, String endTime) {
|
public List<Map<String, String>> findByDoItemType(String starTime, String endTime) {
|
||||||
List<SaleDataItemTypeVo> list;
|
List<SaleDataItemTypeVo> list = saleDataRepository.findAllByItemtypenameTime(starTime, this.publicMethod(endTime));
|
||||||
if (starTime == null || endTime == null){
|
|
||||||
// 获取当前日期
|
|
||||||
LocalDate currentDate = LocalDate.now();
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
||||||
String formattedDate = currentDate.format(formatter);
|
|
||||||
// 将当前日期加一天
|
|
||||||
LocalDate nextDay = currentDate.plusDays(1);
|
|
||||||
String nextDayFormatter = nextDay.format(formatter);
|
|
||||||
list = saleDataRepository.findAllByItemtypenameTime(formattedDate, nextDayFormatter);
|
|
||||||
}else {
|
|
||||||
list = saleDataRepository.findAllByItemtypenameTime(starTime, endTime);
|
|
||||||
}
|
|
||||||
Map<String, Long> countMap = list.stream()
|
Map<String, Long> countMap = list.stream()
|
||||||
.collect(Collectors.groupingBy(SaleDataItemTypeVo::getItemtypename, Collectors.counting()));
|
.collect(Collectors.groupingBy(SaleDataItemTypeVo::getItemtypename, Collectors.counting()));
|
||||||
List<Map<String, String>> mapArrayList = new ArrayList<>();
|
List<Map<String, String>> mapArrayList = new ArrayList<>();
|
||||||
@ -419,7 +409,7 @@ public class SaleDataServiceImpl implements SaleDataService {
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
while (!calendar.getTime().after(date1)){
|
while (!calendar.getTime().after(date1)){
|
||||||
String date = inputFormat.format(calendar.getTime());
|
String date = inputFormat.format(calendar.getTime());
|
||||||
long i = this.countBySddate(date);
|
long i = saleDataRepository.countBySddate(date);
|
||||||
count+=i;
|
count+=i;
|
||||||
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
||||||
}
|
}
|
||||||
|
@ -1,132 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# mongodb数据源
|
|
||||||
data:
|
|
||||||
mongodb:
|
|
||||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
|
||||||
database: sn-lundu-db
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,123 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# mongodb数据源
|
|
||||||
data:
|
|
||||||
mongodb:
|
|
||||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
|
||||||
database: sn-lundu-db
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,98 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
|
||||||
|
|
||||||
# Servlet 配置
|
|
||||||
servlet:
|
|
||||||
# 文件上传相关配置项
|
|
||||||
multipart:
|
|
||||||
max-file-size: 16MB # 单个文件大小
|
|
||||||
max-request-size: 32MB # 设置总上传的文件大小
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
|
||||||
|
|
||||||
# Jackson 配置项
|
|
||||||
jackson:
|
|
||||||
serialization:
|
|
||||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
||||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
||||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
||||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
||||||
|
|
||||||
# Cache 配置项
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
redis:
|
|
||||||
time-to-live: 1h # 设置过期时间为 1 小时
|
|
||||||
|
|
||||||
--- #################### 接口文档配置 ####################
|
|
||||||
|
|
||||||
springdoc:
|
|
||||||
api-docs:
|
|
||||||
enabled: true # 1. 是否开启 Swagger 接文档的元数据
|
|
||||||
path: /v3/api-docs
|
|
||||||
swagger-ui:
|
|
||||||
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
|
||||||
path: /swagger-ui.html
|
|
||||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# MyBatis Plus 的配置项
|
|
||||||
mybatis-plus:
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
|
||||||
global-config:
|
|
||||||
db-config:
|
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
|
||||||
encryptor:
|
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
|
||||||
|
|
||||||
mybatis-plus-join:
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
|
|
||||||
# Spring Data Redis 配置
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
repositories:
|
|
||||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
|
||||||
|
|
||||||
# VO 转换(数据翻译)相关
|
|
||||||
easy-trans:
|
|
||||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
|
||||||
is-enable-cloud: false # 禁用 TransType.RPC 微服务模式
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
||||||
base-package: cn.iocoder.yudao.module.datacenter
|
|
||||||
swagger:
|
|
||||||
title: 管理后台
|
|
||||||
description: 提供管理员管理的所有功能
|
|
||||||
version: ${yudao.info.version}
|
|
||||||
base-package: ${yudao.info.base-package}
|
|
||||||
captcha:
|
|
||||||
enable: true # 验证码的开关,默认为 true;
|
|
||||||
tenant: # 多租户相关配置项
|
|
||||||
enable: false
|
|
||||||
ignore-urls:
|
|
||||||
ignore-tables:
|
|
||||||
|
|
||||||
debug: false
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,7 +1,8 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: datacenter-server
|
name: datacenter-server
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
@ -12,3 +13,27 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
|
||||||
|
--- #################### 配置中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||||
|
config:
|
||||||
|
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
||||||
|
|
||||||
|
@ -1,126 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_parking?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.parking.dal.mysql: debug
|
|
||||||
# cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
# cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,126 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_parking?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.parking.dal.mysql: debug
|
|
||||||
# cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
# cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,136 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
|
||||||
|
|
||||||
# Servlet 配置
|
|
||||||
servlet:
|
|
||||||
# 文件上传相关配置项
|
|
||||||
multipart:
|
|
||||||
max-file-size: 16MB # 单个文件大小
|
|
||||||
max-request-size: 32MB # 设置总上传的文件大小
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
|
||||||
|
|
||||||
# Jackson 配置项
|
|
||||||
jackson:
|
|
||||||
serialization:
|
|
||||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
||||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
||||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
||||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
||||||
|
|
||||||
# Cache 配置项
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
redis:
|
|
||||||
time-to-live: 1h # 设置过期时间为 1 小时
|
|
||||||
|
|
||||||
--- #################### 接口文档配置 ####################
|
|
||||||
|
|
||||||
springdoc:
|
|
||||||
api-docs:
|
|
||||||
enabled: true # 1. 是否开启 Swagger 接文档的元数据
|
|
||||||
path: /v3/api-docs
|
|
||||||
swagger-ui:
|
|
||||||
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
|
||||||
path: /swagger-ui.html
|
|
||||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# MyBatis Plus 的配置项
|
|
||||||
mybatis-plus:
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
|
||||||
global-config:
|
|
||||||
db-config:
|
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
|
||||||
encryptor:
|
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
|
||||||
|
|
||||||
mybatis-plus-join:
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
|
|
||||||
# Spring Data Redis 配置
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
repositories:
|
|
||||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
|
||||||
|
|
||||||
# VO 转换(数据翻译)相关
|
|
||||||
easy-trans:
|
|
||||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
|
||||||
is-enable-cloud: false # 禁用 TransType.RPC 微服务模式
|
|
||||||
|
|
||||||
--- #################### RPC 远程调用相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin
|
|
||||||
executor:
|
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
|
||||||
address:
|
|
||||||
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
|
||||||
port: 0 # ### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
|
|
||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
|
||||||
logretentiondays: 30 # 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
|
|
||||||
accessToken: # 执行器通讯TOKEN
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
||||||
base-package: cn.iocoder.yudao.module.parking
|
|
||||||
swagger:
|
|
||||||
title: 管理后台
|
|
||||||
description: 提供管理员管理的所有功能
|
|
||||||
version: ${yudao.info.version}
|
|
||||||
base-package: ${yudao.info.base-package}
|
|
||||||
captcha:
|
|
||||||
enable: true # 验证码的开关,默认为 true;
|
|
||||||
tenant: # 多租户相关配置项
|
|
||||||
enable: false
|
|
||||||
ignore-urls:
|
|
||||||
ignore-tables:
|
|
||||||
|
|
||||||
debug: false
|
|
||||||
lundu:
|
|
||||||
# Linux系统下文件路径
|
|
||||||
basePath: /home/upload/bcinterface/Uplmage/
|
|
||||||
#Windows下的文件路径
|
|
||||||
imgPath: https://yyxh.ptzykjgs.com/api/img/
|
|
||||||
#蓝卡
|
|
||||||
blueCar:
|
|
||||||
key: 7h5bdg7k926s28lzb5fny8pcrbtr426m
|
|
||||||
parkNumber: p230613141235
|
|
||||||
Request:
|
|
||||||
host: 127.0.0.1
|
|
||||||
port: 8080
|
|
||||||
ip: swapi.bluecardsoft.com/bcopenapi
|
|
||||||
parkName: 石家庄联调专用
|
|
||||||
|
|
||||||
#海康
|
|
||||||
haiKang:
|
|
||||||
appKey: abcdefg
|
|
||||||
appSecret: hijklmn
|
|
||||||
host: 127.0.0.1
|
|
||||||
port: 8088
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,7 +1,8 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: parking-server
|
name: parking-server
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
@ -12,3 +13,26 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
|
||||||
|
--- #################### 配置中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||||
|
config:
|
||||||
|
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
||||||
|
@ -1,132 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# mongodb数据源
|
|
||||||
data:
|
|
||||||
mongodb:
|
|
||||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
|
||||||
database: sn-lundu-db
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,132 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# mongodb数据源
|
|
||||||
data:
|
|
||||||
mongodb:
|
|
||||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
|
||||||
database: sn-lundu-db
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,108 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
|
||||||
# Servlet 配置
|
|
||||||
servlet:
|
|
||||||
# 文件上传相关配置项
|
|
||||||
multipart:
|
|
||||||
max-file-size: 16MB # 单个文件大小
|
|
||||||
max-request-size: 32MB # 设置总上传的文件大小
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
|
||||||
|
|
||||||
# Jackson 配置项
|
|
||||||
jackson:
|
|
||||||
serialization:
|
|
||||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
||||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
||||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
||||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
||||||
|
|
||||||
# Cache 配置项
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
redis:
|
|
||||||
time-to-live: 1h # 设置过期时间为 1 小时
|
|
||||||
|
|
||||||
--- #################### 接口文档配置 ####################
|
|
||||||
|
|
||||||
springdoc:
|
|
||||||
api-docs:
|
|
||||||
enabled: true # 1. 是否开启 Swagger 接文档的元数据
|
|
||||||
path: /v3/api-docs
|
|
||||||
swagger-ui:
|
|
||||||
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
|
||||||
path: /swagger-ui.html
|
|
||||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# MyBatis Plus 的配置项
|
|
||||||
mybatis-plus:
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
|
||||||
global-config:
|
|
||||||
db-config:
|
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
|
||||||
encryptor:
|
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
|
||||||
|
|
||||||
mybatis-plus-join:
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
|
|
||||||
# Spring Data Redis 配置
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
repositories:
|
|
||||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
|
||||||
|
|
||||||
# VO 转换(数据翻译)相关
|
|
||||||
easy-trans:
|
|
||||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
|
||||||
is-enable-cloud: false # 禁用 TransType.RPC 微服务模式
|
|
||||||
|
|
||||||
--- #################### RPC 远程调用相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
executor:
|
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
|
||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
|
||||||
accessToken: default_token # 执行器通讯TOKEN
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
||||||
base-package: cn.iocoder.yudao.module.ticket
|
|
||||||
swagger:
|
|
||||||
title: 管理后台
|
|
||||||
description: 提供管理员管理的所有功能
|
|
||||||
version: ${yudao.info.version}
|
|
||||||
base-package: ${yudao.info.base-package}
|
|
||||||
captcha:
|
|
||||||
enable: true # 验证码的开关,默认为 true;
|
|
||||||
tenant: # 多租户相关配置项
|
|
||||||
enable: true
|
|
||||||
ignore-urls:
|
|
||||||
ignore-tables:
|
|
||||||
|
|
||||||
debug: false
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,7 +1,8 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: ticket-server
|
name: ticket-server
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
@ -12,3 +13,26 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
|
||||||
|
--- #################### 配置中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||||
|
config:
|
||||||
|
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
@ -1,76 +0,0 @@
|
|||||||
<configuration>
|
|
||||||
<!-- 引用 Spring Boot 的 logback 基础配置 -->
|
|
||||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
|
||||||
<!-- 变量 yudao.info.base-package,基础业务包 -->
|
|
||||||
<springProperty scope="context" name="yudao.info.base-package" source="yudao.info.base-package"/>
|
|
||||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
|
||||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
|
||||||
|
|
||||||
<!-- 控制台 Appender -->
|
|
||||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
||||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
|
||||||
<pattern>${PATTERN_DEFAULT}</pattern>
|
|
||||||
</layout>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 文件 Appender -->
|
|
||||||
<!-- 参考 Spring Boot 的 file-appender.xml 编写 -->
|
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
||||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
|
||||||
<pattern>${PATTERN_DEFAULT}</pattern>
|
|
||||||
</layout>
|
|
||||||
</encoder>
|
|
||||||
<!-- 日志文件名 -->
|
|
||||||
<file>${LOG_FILE}</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<!-- 滚动后的日志文件名 -->
|
|
||||||
<fileNamePattern>${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz}</fileNamePattern>
|
|
||||||
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
|
|
||||||
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
|
|
||||||
<!-- 日志文件,到达多少容量,进行滚动 -->
|
|
||||||
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}</maxFileSize>
|
|
||||||
<!-- 日志文件的总大小,0 表示不限制 -->
|
|
||||||
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
|
|
||||||
<!-- 日志文件的保留天数 -->
|
|
||||||
<maxHistory>${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30}</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
</appender>
|
|
||||||
<!-- 异步写入日志,提升性能 -->
|
|
||||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
|
|
||||||
<!-- 不丢失日志。默认的,如果队列的 80% 已满,则会丢弃 TRACT、DEBUG、INFO 级别的日志 -->
|
|
||||||
<discardingThreshold>0</discardingThreshold>
|
|
||||||
<!-- 更改默认的队列的深度,该值会影响性能。默认值为 256 -->
|
|
||||||
<queueSize>256</queueSize>
|
|
||||||
<appender-ref ref="FILE"/>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- SkyWalking GRPC 日志收集,实现日志中心。注意:SkyWalking 8.4.0 版本开始支持 -->
|
|
||||||
<appender name="GRPC" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
|
||||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
||||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
|
||||||
<pattern>${PATTERN_DEFAULT}</pattern>
|
|
||||||
</layout>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 本地环境 -->
|
|
||||||
<springProfile name="local">
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="STDOUT"/>
|
|
||||||
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
|
|
||||||
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
|
|
||||||
</root>
|
|
||||||
</springProfile>
|
|
||||||
<!-- 其它环境 -->
|
|
||||||
<springProfile name="dev,test,stage,prod,default">
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="STDOUT"/>
|
|
||||||
<appender-ref ref="ASYNC"/>
|
|
||||||
<appender-ref ref="GRPC"/>
|
|
||||||
</root>
|
|
||||||
</springProfile>
|
|
||||||
|
|
||||||
</configuration>
|
|
@ -1,232 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
|
|
||||||
cloud:
|
|
||||||
# Spring Cloud Gateway 配置项,对应 GatewayProperties 类
|
|
||||||
gateway:
|
|
||||||
# 路由配置项,对应 RouteDefinition 数组
|
|
||||||
routes:
|
|
||||||
## system-server 服务
|
|
||||||
- id: system-admin-api # 路由的编号
|
|
||||||
uri: grayLb://system-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/system/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/system/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
- id: system-app-api # 路由的编号
|
|
||||||
uri: grayLb://system-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/system/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/system/v3/api-docs, /v3/api-docs
|
|
||||||
## infra-server 服务
|
|
||||||
- id: infra-admin-api # 路由的编号
|
|
||||||
uri: grayLb://infra-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/infra/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/infra/v3/api-docs, /v3/api-docs
|
|
||||||
- id: infra-app-api # 路由的编号
|
|
||||||
uri: grayLb://infra-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/infra/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/infra/v3/api-docs, /v3/api-docs
|
|
||||||
- id: infra-spring-boot-admin # 路由的编号(Spring Boot Admin)
|
|
||||||
uri: grayLb://infra-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin/**
|
|
||||||
- id: infra-websocket # 路由的编号(WebSocket)
|
|
||||||
uri: grayLb://infra-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/infra/ws/**
|
|
||||||
## member-server 服务
|
|
||||||
- id: member-admin-api # 路由的编号
|
|
||||||
uri: grayLb://member-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/member/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/member/v3/api-docs, /v3/api-docs
|
|
||||||
- id: member-app-api # 路由的编号
|
|
||||||
uri: grayLb://member-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/member/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/member/v3/api-docs, /v3/api-docs
|
|
||||||
## bpm-server 服务
|
|
||||||
- id: bpm-admin-api # 路由的编号
|
|
||||||
uri: grayLb://bpm-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/bpm/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/bpm/v3/api-docs, /v3/api-docs
|
|
||||||
## report-server 服务
|
|
||||||
- id: report-admin-api # 路由的编号
|
|
||||||
uri: grayLb://report-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/report/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/report/v3/api-docs, /v3/api-docs
|
|
||||||
- id: report-jimu # 路由的编号(积木报表)
|
|
||||||
uri: grayLb://report-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/jmreport/**
|
|
||||||
## pay-server 服务
|
|
||||||
- id: pay-admin-api # 路由的编号
|
|
||||||
uri: grayLb://pay-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/pay/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/pay/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
- id: pay-app-api # 路由的编号
|
|
||||||
uri: grayLb://pay-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/pay/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/pay/v3/api-docs, /v3/api-docs
|
|
||||||
## mp-server 服务
|
|
||||||
- id: mp-admin-api # 路由的编号
|
|
||||||
uri: grayLb://mp-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/mp/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/mp/v3/api-docs, /v3/api-docs
|
|
||||||
## product-server 服务
|
|
||||||
- id: product-admin-api # 路由的编号
|
|
||||||
uri: grayLb://product-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/product/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/product/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
- id: product-app-api # 路由的编号
|
|
||||||
uri: grayLb://product-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/product/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/product/v3/api-docs, /v3/api-docs
|
|
||||||
## promotion-server 服务
|
|
||||||
- id: promotion-admin-api # 路由的编号
|
|
||||||
uri: grayLb://promotion-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/promotion/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/promotion/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
- id: promotion-app-api # 路由的编号
|
|
||||||
uri: grayLb://promotion-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/promotion/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/promotion/v3/api-docs, /v3/api-docs
|
|
||||||
# member-server 服务
|
|
||||||
- id: parking-admin-api # 路由的编号
|
|
||||||
uri: grayLb://parking-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/parking/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/parking/v3/api-docs, /v3/api-docs
|
|
||||||
- id: parking-app-api # 路由的编号
|
|
||||||
uri: grayLb://parking-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/parking/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/parking/v3/api-docs, /v3/api-docs
|
|
||||||
## trade-server 服务
|
|
||||||
- id: trade-admin-api # 路由的编号
|
|
||||||
uri: grayLb://trade-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/trade/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/trade/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
- id: trade-app-api # 路由的编号
|
|
||||||
uri: grayLb://trade-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/app-api/trade/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/app-api/trade/v3/api-docs, /v3/api-docs
|
|
||||||
## statistics-server 服务
|
|
||||||
- id: statistics-admin-api # 路由的编号
|
|
||||||
uri: grayLb://statistics-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/statistics/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/statistics/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
## erp-server 服务
|
|
||||||
- id: erp-admin-api # 路由的编号
|
|
||||||
uri: grayLb://erp-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/erp/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/erp/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
## crm-server 服务
|
|
||||||
- id: crm-admin-api # 路由的编号
|
|
||||||
uri: grayLb://crm-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/crm/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/crm/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
## ticketing 服务
|
|
||||||
- id: ticket-admin-api # 路由的编号
|
|
||||||
uri: grayLb://ticket-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/admin-api/ticket/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/ticket/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
## datacenter 服务
|
|
||||||
- id: datacenter-admin-api # 路由的编号
|
|
||||||
uri: grayLb://datacenter-server
|
|
||||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
||||||
- Path=/api/**
|
|
||||||
filters:
|
|
||||||
- RewritePath=/admin-api/datacenter/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
|
||||||
|
|
||||||
x-forwarded:
|
|
||||||
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
# 聚合 Swagger 文档,参考 https://doc.xiaominfo.com/docs/action/springcloud-gateway 文档
|
|
||||||
gateway:
|
|
||||||
enabled: true
|
|
||||||
routes:
|
|
||||||
- name: system-server
|
|
||||||
service-name: system-server
|
|
||||||
url: /admin-api/system/v3/api-docs
|
|
||||||
- name: infra-server
|
|
||||||
service-name: infra-server
|
|
||||||
url: /admin-api/infra/v3/api-docs
|
|
||||||
- name: member-server
|
|
||||||
service-name: member-server
|
|
||||||
url: /admin-api/member/v3/api-docs
|
|
||||||
- name: bpm-server
|
|
||||||
service-name: bpm-server
|
|
||||||
url: /admin-api/bpm/v3/api-docs
|
|
||||||
- name: pay-server
|
|
||||||
service-name: pay-server
|
|
||||||
url: /admin-api/pay/v3/api-docs
|
|
||||||
- name: mp-server
|
|
||||||
service-name: mp-server
|
|
||||||
url: /admin-api/mp/v3/api-docs
|
|
||||||
- name: product-server
|
|
||||||
service-name: product-server
|
|
||||||
url: /admin-api/product/v3/api-docs
|
|
||||||
- name: promotion-server
|
|
||||||
service-name: promotion-server
|
|
||||||
url: /admin-api/promotion/v3/api-docs
|
|
||||||
- name: trade-server
|
|
||||||
service-name: trade-server
|
|
||||||
url: /admin-api/trade/v3/api-docs
|
|
||||||
- name: statistics-server
|
|
||||||
service-name: statistics-server
|
|
||||||
url: /admin-api/statistics/v3/api-docs
|
|
||||||
- name: erp-server
|
|
||||||
service-name: erp-server
|
|
||||||
url: /admin-api/erp/v3/api-docs
|
|
||||||
- name: crm-server
|
|
||||||
service-name: crm-server
|
|
||||||
url: /admin-api/crm/v3/api-docs
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,21 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -12,3 +12,18 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
config:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
||||||
|
group: DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name}
|
@ -1,162 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
mongodb:
|
|
||||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
|
||||||
database: sn-lundu-db
|
|
||||||
# uri: mongodb://127.0.0.1:27017/sn-lundu-db?
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
|
||||||
- de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
|
||||||
- de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
ticketing:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
||||||
rocketmq:
|
|
||||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
|
||||||
|
|
||||||
spring:
|
|
||||||
# RabbitMQ 配置项,对应 RabbitProperties 配置类
|
|
||||||
rabbitmq:
|
|
||||||
host: 127.0.0.1 # RabbitMQ 服务的地址
|
|
||||||
port: 5672 # RabbitMQ 服务的端口
|
|
||||||
username: guest # RabbitMQ 服务的账号
|
|
||||||
password: guest # RabbitMQ 服务的密码
|
|
||||||
# Kafka 配置项,对应 KafkaProperties 配置类
|
|
||||||
kafka:
|
|
||||||
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: https://mt.ptzykjgs.com/xxl-job-admin
|
|
||||||
executor:
|
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
|
||||||
address:
|
|
||||||
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
|
||||||
port: 0 # ### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
|
|
||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
|
||||||
logretentiondays: 30 # 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
|
|
||||||
accessToken: # 执行器通讯TOKEN
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
# Spring Boot Admin Server 服务端的相关配置
|
|
||||||
context-path: /admin # 配置 Spring
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.infra.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info,避免和 GlobalExceptionHandler 重复打印
|
|
||||||
cn.iocoder.yudao.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
|
|
||||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
|
||||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,162 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
mongodb:
|
|
||||||
uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256
|
|
||||||
database: sn-lundu-db
|
|
||||||
# uri: mongodb://127.0.0.1:27017/sn-lundu-db?
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
|
||||||
- de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
|
|
||||||
- de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
ticketing:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
||||||
rocketmq:
|
|
||||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
|
||||||
|
|
||||||
spring:
|
|
||||||
# RabbitMQ 配置项,对应 RabbitProperties 配置类
|
|
||||||
rabbitmq:
|
|
||||||
host: 127.0.0.1 # RabbitMQ 服务的地址
|
|
||||||
port: 5672 # RabbitMQ 服务的端口
|
|
||||||
username: guest # RabbitMQ 服务的账号
|
|
||||||
password: guest # RabbitMQ 服务的密码
|
|
||||||
# Kafka 配置项,对应 KafkaProperties 配置类
|
|
||||||
kafka:
|
|
||||||
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin
|
|
||||||
executor:
|
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
|
||||||
address:
|
|
||||||
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
|
||||||
port: 0 # ### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
|
|
||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
|
||||||
logretentiondays: 30 # 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
|
|
||||||
accessToken: # 执行器通讯TOKEN
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
# Spring Boot Admin Server 服务端的相关配置
|
|
||||||
context-path: /admin # 配置 Spring
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.infra.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info,避免和 GlobalExceptionHandler 重复打印
|
|
||||||
cn.iocoder.yudao.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
|
|
||||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
|
||||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
@ -1,152 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
|
||||||
|
|
||||||
# Servlet 配置
|
|
||||||
servlet:
|
|
||||||
# 文件上传相关配置项
|
|
||||||
multipart:
|
|
||||||
max-file-size: 16MB # 单个文件大小
|
|
||||||
max-request-size: 32MB # 设置总上传的文件大小
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
|
||||||
|
|
||||||
# Jackson 配置项
|
|
||||||
jackson:
|
|
||||||
serialization:
|
|
||||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
||||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
||||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
||||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
||||||
|
|
||||||
# Cache 配置项
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
redis:
|
|
||||||
time-to-live: 1h # 设置过期时间为 1 小时
|
|
||||||
|
|
||||||
--- #################### 接口文档配置 ####################
|
|
||||||
|
|
||||||
springdoc:
|
|
||||||
api-docs:
|
|
||||||
enabled: true # 1. 是否开启 Swagger 接文档的元数据
|
|
||||||
path: /v3/api-docs
|
|
||||||
swagger-ui:
|
|
||||||
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
|
||||||
path: /swagger-ui.html
|
|
||||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# MyBatis Plus 的配置项
|
|
||||||
mybatis-plus:
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
|
||||||
global-config:
|
|
||||||
db-config:
|
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
|
||||||
encryptor:
|
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
|
||||||
|
|
||||||
mybatis-plus-join:
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
|
|
||||||
# Spring Data Redis 配置
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
repositories:
|
|
||||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
|
||||||
|
|
||||||
# VO 转换(数据翻译)相关
|
|
||||||
easy-trans:
|
|
||||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
|
||||||
is-enable-cloud: false # 禁用 TransType.RPC 微服务模式
|
|
||||||
|
|
||||||
--- #################### RPC 远程调用相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 消息队列相关 ####################
|
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
||||||
rocketmq:
|
|
||||||
# Producer 配置项
|
|
||||||
producer:
|
|
||||||
group: ${spring.application.name}_PRODUCER # 生产者分组
|
|
||||||
|
|
||||||
spring:
|
|
||||||
# Kafka 配置项,对应 KafkaProperties 配置类
|
|
||||||
kafka:
|
|
||||||
# Kafka Producer 配置项
|
|
||||||
producer:
|
|
||||||
acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。
|
|
||||||
retries: 3 # 发送失败时,重试发送的次数
|
|
||||||
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer # 消息的 value 的序列化
|
|
||||||
# Kafka Consumer 配置项
|
|
||||||
consumer:
|
|
||||||
auto-offset-reset: earliest # 设置消费者分组最初的消费进度为 earliest 。可参考博客 https://blog.csdn.net/lishuangzhe7047/article/details/74530417 理解
|
|
||||||
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
|
|
||||||
properties:
|
|
||||||
spring.json.trusted.packages: '*'
|
|
||||||
# Kafka Consumer Listener 监听器配置
|
|
||||||
listener:
|
|
||||||
missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
||||||
base-package: cn.iocoder.yudao.module.infra
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
websocket:
|
|
||||||
enable: true # websocket的开关
|
|
||||||
path: /infra/ws # 路径
|
|
||||||
sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq
|
|
||||||
sender-rocketmq:
|
|
||||||
topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic
|
|
||||||
consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group
|
|
||||||
sender-rabbitmq:
|
|
||||||
exchange: ${spring.application.name}-websocket-exchange # 消息发送的 RabbitMQ Exchange
|
|
||||||
queue: ${spring.application.name}-websocket-queue # 消息发送的 RabbitMQ Queue
|
|
||||||
sender-kafka:
|
|
||||||
topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic
|
|
||||||
consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group
|
|
||||||
swagger:
|
|
||||||
title: 管理后台
|
|
||||||
description: 提供管理员管理的所有功能
|
|
||||||
version: ${yudao.info.version}
|
|
||||||
base-package: ${yudao.info.base-package}
|
|
||||||
codegen:
|
|
||||||
base-package: cn.iocoder.yudao
|
|
||||||
db-schemas: ${spring.datasource.dynamic.datasource.master.name}
|
|
||||||
front-type: 10 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类
|
|
||||||
tenant: # 多租户相关配置项
|
|
||||||
enable: true
|
|
||||||
ignore-urls:
|
|
||||||
- /admin-api/infra/file/*/get/** # 获取图片,和租户无关
|
|
||||||
ignore-tables:
|
|
||||||
- infra_codegen_column
|
|
||||||
- infra_codegen_table
|
|
||||||
- infra_config
|
|
||||||
- infra_file_config
|
|
||||||
- infra_file
|
|
||||||
- infra_file_content
|
|
||||||
- infra_job
|
|
||||||
- infra_job_log
|
|
||||||
- infra_data_source_config
|
|
||||||
|
|
||||||
debug: false
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,7 +1,8 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: infra-server
|
name: infra-server
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
@ -12,3 +13,26 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
|
||||||
|
--- #################### 配置中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||||
|
config:
|
||||||
|
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
||||||
|
@ -1,201 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
||||||
rocketmq:
|
|
||||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
|
||||||
|
|
||||||
spring:
|
|
||||||
# RabbitMQ 配置项,对应 RabbitProperties 配置类
|
|
||||||
rabbitmq:
|
|
||||||
host: 127.0.0.1 # RabbitMQ 服务的地址
|
|
||||||
port: 5672 # RabbitMQ 服务的端口
|
|
||||||
username: guest # RabbitMQ 服务的账号
|
|
||||||
password: guest # RabbitMQ 服务的密码
|
|
||||||
# Kafka 配置项,对应 KafkaProperties 配置类
|
|
||||||
kafka:
|
|
||||||
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 微信公众号、小程序相关配置 ####################
|
|
||||||
wx:
|
|
||||||
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
|
|
||||||
# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的)
|
|
||||||
# secret: 5abee519483bc9f8cb37ce280e814bd0
|
|
||||||
app-id: wx5b23ba7a5589ecbb # 测试号(自己的)
|
|
||||||
secret: 2a7b3b20c537e52e74afd395eb85f61f
|
|
||||||
# app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的)
|
|
||||||
# secret: bd4f9fab889591b62aeac0d7b8d8b4a0
|
|
||||||
# 存储配置,解决 AccessToken 的跨节点的共享
|
|
||||||
config-storage:
|
|
||||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
|
||||||
key-prefix: wx # Redis Key 的前缀
|
|
||||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
|
||||||
miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
|
|
||||||
# appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的)
|
|
||||||
# secret: 333ae72f41552af1e998fe1f54e1584a
|
|
||||||
appid: wx63c280fe3248a3e7 # wenhualian的接口测试号
|
|
||||||
secret: 6f270509224a7ae1296bbf1c8cb97aed
|
|
||||||
# appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的)
|
|
||||||
# secret: 4a1a04e07f6a4a0751b39c3064a92c8b
|
|
||||||
config-storage:
|
|
||||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
|
||||||
key-prefix: wa # Redis Key 的前缀
|
|
||||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
captcha:
|
|
||||||
enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
|
|
||||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
|
||||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
|
||||||
pay:
|
|
||||||
pay-notify-url: http://niubi.natapp1.cc/api/pay/order/notify
|
|
||||||
pay-return-url: http://niubi.natapp1.cc/api/pay/order/return
|
|
||||||
refund-notify-url: http://niubi.natapp1.cc/api/pay/refund/notify
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
||||||
|
|
||||||
justauth:
|
|
||||||
enabled: true
|
|
||||||
type:
|
|
||||||
DINGTALK: # 钉钉
|
|
||||||
client-id: dingvrnreaje3yqvzhxg
|
|
||||||
client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
WECHAT_ENTERPRISE: # 企业微信
|
|
||||||
client-id: wwd411c69a39ad2e54
|
|
||||||
client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
|
|
||||||
agent-id: 1000004
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
# noinspection SpringBootApplicationYaml
|
|
||||||
WECHAT_MINI_APP: # 微信小程序
|
|
||||||
client-id: ${wx.miniapp.appid}
|
|
||||||
client-secret: ${wx.miniapp.secret}
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
|
|
||||||
WECHAT_MP: # 微信公众号
|
|
||||||
client-id: ${wx.mp.app-id}
|
|
||||||
client-secret: ${wx.mp.secret}
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
|
|
||||||
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
|
|
@ -1,201 +0,0 @@
|
|||||||
--- #################### 数据库相关配置 ####################
|
|
||||||
spring:
|
|
||||||
# 数据源配置项
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
||||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
||||||
datasource:
|
|
||||||
druid: # Druid 【监控】相关的全局配置
|
|
||||||
web-stat-filter:
|
|
||||||
enabled: true
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
allow: # 设置白名单,不填则允许所有访问
|
|
||||||
url-pattern: /druid/*
|
|
||||||
login-username: # 控制台管理用户名和密码
|
|
||||||
login-password:
|
|
||||||
filter:
|
|
||||||
stat:
|
|
||||||
enabled: true
|
|
||||||
log-slow-sql: true # 慢 SQL 记录
|
|
||||||
slow-sql-millis: 100
|
|
||||||
merge-sql: true
|
|
||||||
wall:
|
|
||||||
config:
|
|
||||||
multi-statement-allow: true
|
|
||||||
dynamic: # 多数据源配置
|
|
||||||
druid: # Druid 【连接池】相关的全局配置
|
|
||||||
initial-size: 1 # 初始连接数
|
|
||||||
min-idle: 1 # 最小连接池数量
|
|
||||||
max-active: 20 # 最大连接池数量
|
|
||||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
|
||||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
|
||||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
|
||||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
|
||||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
||||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
|
||||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
|
||||||
username: root
|
|
||||||
password: xpower1234
|
|
||||||
# username: sa # SQL Server 连接的示例
|
|
||||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
|
||||||
# username: SYSDBA # DM 连接的示例
|
|
||||||
# password: SYSDBA # DM 连接的示例
|
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: 123456
|
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
||||||
redis:
|
|
||||||
host: crm.fjptzykj.com # 地址
|
|
||||||
port: 6379 # 端口
|
|
||||||
database: 0 # 数据库索引
|
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
||||||
rocketmq:
|
|
||||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
|
||||||
|
|
||||||
spring:
|
|
||||||
# RabbitMQ 配置项,对应 RabbitProperties 配置类
|
|
||||||
rabbitmq:
|
|
||||||
host: 127.0.0.1 # RabbitMQ 服务的地址
|
|
||||||
port: 5672 # RabbitMQ 服务的端口
|
|
||||||
username: guest # RabbitMQ 服务的账号
|
|
||||||
password: guest # RabbitMQ 服务的密码
|
|
||||||
# Kafka 配置项,对应 KafkaProperties 配置类
|
|
||||||
kafka:
|
|
||||||
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
|
||||||
|
|
||||||
--- #################### 服务保障相关配置 ####################
|
|
||||||
|
|
||||||
# Lock4j 配置项
|
|
||||||
lock4j:
|
|
||||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
|
||||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
|
||||||
|
|
||||||
--- #################### 监控相关配置 ####################
|
|
||||||
|
|
||||||
# Actuator 监控端点的配置项
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
||||||
exposure:
|
|
||||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
||||||
|
|
||||||
# Spring Boot Admin 配置项
|
|
||||||
spring:
|
|
||||||
boot:
|
|
||||||
admin:
|
|
||||||
# Spring Boot Admin Client 客户端的相关配置
|
|
||||||
client:
|
|
||||||
instance:
|
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
||||||
|
|
||||||
# 日志文件配置
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql: debug
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
||||||
cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
||||||
|
|
||||||
--- #################### 微信公众号、小程序相关配置 ####################
|
|
||||||
wx:
|
|
||||||
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
|
|
||||||
# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的)
|
|
||||||
# secret: 5abee519483bc9f8cb37ce280e814bd0
|
|
||||||
app-id: wx5b23ba7a5589ecbb # 测试号(自己的)
|
|
||||||
secret: 2a7b3b20c537e52e74afd395eb85f61f
|
|
||||||
# app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的)
|
|
||||||
# secret: bd4f9fab889591b62aeac0d7b8d8b4a0
|
|
||||||
# 存储配置,解决 AccessToken 的跨节点的共享
|
|
||||||
config-storage:
|
|
||||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
|
||||||
key-prefix: wx # Redis Key 的前缀
|
|
||||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
|
||||||
miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
|
|
||||||
# appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的)
|
|
||||||
# secret: 333ae72f41552af1e998fe1f54e1584a
|
|
||||||
appid: wx63c280fe3248a3e7 # wenhualian的接口测试号
|
|
||||||
secret: 6f270509224a7ae1296bbf1c8cb97aed
|
|
||||||
# appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的)
|
|
||||||
# secret: 4a1a04e07f6a4a0751b39c3064a92c8b
|
|
||||||
config-storage:
|
|
||||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
|
||||||
key-prefix: wa # Redis Key 的前缀
|
|
||||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
|
||||||
yudao:
|
|
||||||
env: # 多环境的配置项
|
|
||||||
tag: ${HOSTNAME}
|
|
||||||
captcha:
|
|
||||||
enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试
|
|
||||||
security:
|
|
||||||
mock-enable: true
|
|
||||||
xss:
|
|
||||||
enable: false
|
|
||||||
exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
|
|
||||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
|
||||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
|
||||||
pay:
|
|
||||||
pay-notify-url: http://niubi.natapp1.cc/api/pay/order/notify
|
|
||||||
pay-return-url: http://niubi.natapp1.cc/api/pay/order/return
|
|
||||||
refund-notify-url: http://niubi.natapp1.cc/api/pay/refund/notify
|
|
||||||
access-log: # 访问日志的配置项
|
|
||||||
enable: false
|
|
||||||
demo: false # 关闭演示模式
|
|
||||||
|
|
||||||
justauth:
|
|
||||||
enabled: true
|
|
||||||
type:
|
|
||||||
DINGTALK: # 钉钉
|
|
||||||
client-id: dingvrnreaje3yqvzhxg
|
|
||||||
client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
WECHAT_ENTERPRISE: # 企业微信
|
|
||||||
client-id: wwd411c69a39ad2e54
|
|
||||||
client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
|
|
||||||
agent-id: 1000004
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
# noinspection SpringBootApplicationYaml
|
|
||||||
WECHAT_MINI_APP: # 微信小程序
|
|
||||||
client-id: ${wx.miniapp.appid}
|
|
||||||
client-secret: ${wx.miniapp.secret}
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
|
|
||||||
WECHAT_MP: # 微信公众号
|
|
||||||
client-id: ${wx.mp.app-id}
|
|
||||||
client-secret: ${wx.mp.secret}
|
|
||||||
ignore-check-redirect-uri: true
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
|
|
||||||
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
|
|
@ -1,185 +0,0 @@
|
|||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
||||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
|
||||||
|
|
||||||
# Servlet 配置
|
|
||||||
servlet:
|
|
||||||
# 文件上传相关配置项
|
|
||||||
multipart:
|
|
||||||
max-file-size: 16MB # 单个文件大小
|
|
||||||
max-request-size: 32MB # 设置总上传的文件大小
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
|
||||||
|
|
||||||
# Jackson 配置项
|
|
||||||
jackson:
|
|
||||||
serialization:
|
|
||||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
|
||||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
||||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
||||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
|
||||||
|
|
||||||
# Cache 配置项
|
|
||||||
cache:
|
|
||||||
type: REDIS
|
|
||||||
redis:
|
|
||||||
time-to-live: 1h # 设置过期时间为 1 小时
|
|
||||||
|
|
||||||
--- #################### 接口文档配置 ####################
|
|
||||||
|
|
||||||
springdoc:
|
|
||||||
api-docs:
|
|
||||||
enabled: true # 1. 是否开启 Swagger 接文档的元数据
|
|
||||||
path: /v3/api-docs
|
|
||||||
swagger-ui:
|
|
||||||
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
|
||||||
path: /swagger-ui.html
|
|
||||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# MyBatis Plus 的配置项
|
|
||||||
mybatis-plus:
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
|
||||||
global-config:
|
|
||||||
db-config:
|
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
|
||||||
encryptor:
|
|
||||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
|
||||||
|
|
||||||
mybatis-plus-join:
|
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
|
||||||
|
|
||||||
# Spring Data Redis 配置
|
|
||||||
spring:
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
repositories:
|
|
||||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
|
||||||
|
|
||||||
# VO 转换(数据翻译)相关
|
|
||||||
easy-trans:
|
|
||||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
|
||||||
is-enable-cloud: false # 禁用 TransType.RPC 微服务模式
|
|
||||||
|
|
||||||
--- #################### RPC 远程调用相关配置 ####################
|
|
||||||
|
|
||||||
--- #################### 消息队列相关 ####################
|
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
||||||
rocketmq:
|
|
||||||
# Producer 配置项
|
|
||||||
producer:
|
|
||||||
group: ${spring.application.name}_PRODUCER # 生产者分组
|
|
||||||
|
|
||||||
spring:
|
|
||||||
# Kafka 配置项,对应 KafkaProperties 配置类
|
|
||||||
kafka:
|
|
||||||
# Kafka Producer 配置项
|
|
||||||
producer:
|
|
||||||
acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。
|
|
||||||
retries: 3 # 发送失败时,重试发送的次数
|
|
||||||
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer # 消息的 value 的序列化
|
|
||||||
# Kafka Consumer 配置项
|
|
||||||
consumer:
|
|
||||||
auto-offset-reset: earliest # 设置消费者分组最初的消费进度为 earliest 。可参考博客 https://blog.csdn.net/lishuangzhe7047/article/details/74530417 理解
|
|
||||||
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
|
|
||||||
properties:
|
|
||||||
spring.json.trusted.packages: '*'
|
|
||||||
# Kafka Consumer Listener 监听器配置
|
|
||||||
listener:
|
|
||||||
missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
|
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
executor:
|
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
|
||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
|
||||||
accessToken: default_token # 执行器通讯TOKEN
|
|
||||||
|
|
||||||
--- #################### 验证码相关配置 ####################
|
|
||||||
|
|
||||||
aj:
|
|
||||||
captcha:
|
|
||||||
jigsaw: classpath:images/jigsaw # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径
|
|
||||||
pic-click: classpath:images/pic-click # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径
|
|
||||||
cache-type: redis # 缓存 local/redis...
|
|
||||||
cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存
|
|
||||||
timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行
|
|
||||||
type: blockPuzzle # 验证码类型 default两种都实例化。 blockPuzzle 滑块拼图 clickWord 文字点选
|
|
||||||
water-mark: 芋道源码 # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode
|
|
||||||
interference-options: 0 # 滑动干扰项(0/1/2)
|
|
||||||
req-frequency-limit-enable: false # 接口请求次数一分钟限制是否开启 true|false
|
|
||||||
req-get-lock-limit: 5 # 验证失败5次,get接口锁定
|
|
||||||
req-get-lock-seconds: 10 # 验证失败后,锁定时间间隔
|
|
||||||
req-get-minute-limit: 30 # get 接口一分钟内请求数限制
|
|
||||||
req-check-minute-limit: 60 # check 接口一分钟内请求数限制
|
|
||||||
req-verify-minute-limit: 60 # verify 接口一分钟内请求数限制
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
|
||||||
|
|
||||||
yudao:
|
|
||||||
info:
|
|
||||||
version: 1.0.0
|
|
||||||
base-package: cn.iocoder.yudao.module.system
|
|
||||||
web:
|
|
||||||
admin-ui:
|
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
|
||||||
swagger:
|
|
||||||
title: 管理后台
|
|
||||||
description: 提供管理员管理的所有功能
|
|
||||||
version: ${yudao.info.version}
|
|
||||||
base-package: ${yudao.info.base-package}
|
|
||||||
captcha:
|
|
||||||
enable: true # 验证码的开关,默认为 true;
|
|
||||||
tenant: # 多租户相关配置项
|
|
||||||
enable: true
|
|
||||||
ignore-urls:
|
|
||||||
- /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号
|
|
||||||
- /admin-api/system/tenant/get-by-website # 基于域名获取租户,不许带租户编号
|
|
||||||
- /admin-api/system/captcha/get-image # 获取图片验证码,和租户无关
|
|
||||||
- /admin-api/system/captcha/get # 获取图片验证码,和租户无关
|
|
||||||
- /admin-api/system/captcha/check # 校验图片验证码,和租户无关
|
|
||||||
- /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号
|
|
||||||
- /rpc-api/system/tenant/valid # 防止递归。避免调用 /rpc-api/system/tenant/valid 接口时,又去触发 /rpc-api/system/tenant/valid 去校验
|
|
||||||
- /rpc-api/system/tenant/id-list # 获得租户列表的时候,无需传递租户编号
|
|
||||||
- /rpc-api/system/oauth2/token/check # 访问令牌校验时,无需传递租户编号;主要解决上传文件的场景,前端不会传递 tenant-id!
|
|
||||||
ignore-tables:
|
|
||||||
- system_tenant
|
|
||||||
- system_tenant_package
|
|
||||||
- system_dict_data
|
|
||||||
- system_dict_type
|
|
||||||
- system_error_code
|
|
||||||
- system_menu
|
|
||||||
- system_sms_channel
|
|
||||||
- system_sms_template
|
|
||||||
- system_sms_log
|
|
||||||
- system_sensitive_word
|
|
||||||
- system_oauth2_client
|
|
||||||
- system_mail_account
|
|
||||||
- system_mail_template
|
|
||||||
- system_mail_log
|
|
||||||
- system_notify_template
|
|
||||||
sms-code: # 短信验证码相关的配置项
|
|
||||||
expire-times: 10m
|
|
||||||
send-frequency: 1m
|
|
||||||
send-maximum-quantity-per-day: 10
|
|
||||||
begin-code: 9999 # 这里配置 9999 的原因是,测试方便。
|
|
||||||
end-code: 9999 # 这里配置 9999 的原因是,测试方便。
|
|
||||||
|
|
||||||
debug: false
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: crm.fjptzykj.com:8849
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,23 +0,0 @@
|
|||||||
--- #################### 注册中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
discovery:
|
|
||||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
|
||||||
|
|
||||||
--- #################### 配置中心相关配置 ####################
|
|
||||||
|
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
|
||||||
config:
|
|
||||||
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
|
|
||||||
namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
|
||||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
||||||
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
|
||||||
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
|
@ -1,7 +1,9 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: system-server
|
name: system-server
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||||
|
allow-circular-references: true # 解决循环依赖,可能会导致内存泄露
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
@ -12,3 +14,26 @@ server:
|
|||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
|
--- #################### 注册中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: crm.fjptzykj.com:8849
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间。这里使用 dev 开发环境
|
||||||
|
metadata:
|
||||||
|
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||||
|
|
||||||
|
--- #################### 配置中心相关配置 ####################
|
||||||
|
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
|
||||||
|
config:
|
||||||
|
server-addr: crm.fjptzykj.com:8849 # Nacos 服务器地址
|
||||||
|
namespace: ${spring.profiles.active} # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
|
||||||
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||||
|
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
|
||||||
|
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
|
Loading…
x
Reference in New Issue
Block a user