修改bug
Some checks failed
aagro-ui-admin CI / build (14.x) (push) Has been cancelled
aagro-ui-admin CI / build (16.x) (push) Has been cancelled
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
Some checks failed
aagro-ui-admin CI / build (14.x) (push) Has been cancelled
aagro-ui-admin CI / build (16.x) (push) Has been cancelled
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||||
FROM eclipse-temurin:8-jre
|
||||
FROM eclipse-temurin:21-jre
|
||||
|
||||
## 创建目录,并使用它作为工作目录
|
||||
RUN mkdir -p /aagro-server
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<artifactId>aiot</artifactId>
|
||||
<groupId>cn.aagro.aa</groupId>
|
||||
<artifactId>aiotagro</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -22,95 +23,95 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<groupId>cn.aagro.aa</groupId>
|
||||
<artifactId>aagro-module-system</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<groupId>cn.aagro.aa</groupId>
|
||||
<artifactId>aagro-module-infra</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 会员中心。默认注释,保证编译速度 -->
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<artifactId>aagro-module-member</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-member</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 数据报表。默认注释,保证编译速度 -->
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<artifactId>aagro-module-report</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-report</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- 工作流。默认注释,保证编译速度 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-bpm</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- 支付服务。默认注释,保证编译速度 -->
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<artifactId>aagro-module-pay</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-pay</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 微信公众号模块。默认注释,保证编译速度 -->
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<artifactId>aagro-module-mp</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-mp</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 商城相关模块。默认注释,保证编译速度-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-product</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-promotion</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-trade</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-statistics</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- CRM 相关模块。默认注释,保证编译速度 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-crm</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- ERP 相关模块。默认注释,保证编译速度 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-erp</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- AI 大模型相关模块。默认注释,保证编译速度 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-ai</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- IoT 物联网相关模块。默认注释,保证编译速度 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.aagro.gg</groupId>-->
|
||||
<!-- <groupId>cn.aagro.aa</groupId>-->
|
||||
<!-- <artifactId>aagro-module-iot-biz</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
@@ -124,7 +125,7 @@
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.aagro.gg</groupId>
|
||||
<groupId>cn.aagro.aa</groupId>
|
||||
<artifactId>aagro-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.aagro.pp.server;
|
||||
package cn.aagro.ag.server;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
* 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章
|
||||
* 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author AIOTAGRO
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${aagro.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${aagro.info.base-package}.server", "${aagro.info.base-package}.module"})
|
||||
@@ -1,21 +1,20 @@
|
||||
package cn.aagro.pp.server.controller;
|
||||
package cn.aagro.ag.server.controller;
|
||||
|
||||
import cn.aagro.pp.framework.common.pojo.CommonResult;
|
||||
import cn.aagro.pp.framework.common.util.servlet.ServletUtils;
|
||||
import cn.aagro.ag.framework.common.pojo.CommonResult;
|
||||
import cn.aagro.ag.framework.common.util.servlet.ServletUtils;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import static cn.aagro.pp.framework.common.exception.enums.GlobalErrorCodeConstants.NOT_IMPLEMENTED;
|
||||
import static cn.aagro.ag.framework.common.exception.enums.GlobalErrorCodeConstants.NOT_IMPLEMENTED;
|
||||
|
||||
/**
|
||||
* 默认 Controller,解决部分 module 未开启时的 404 提示。
|
||||
* 例如说,/bpm/** 路径,工作流
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author AIOTAGRO
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@@ -1,67 +1,67 @@
|
||||
server:
|
||||
port: 38080
|
||||
port: 48080
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
|
||||
spring:
|
||||
autoconfigure:
|
||||
# noinspection SpringBootApplicationYaml
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- org.springframework.ai.vectorstore.qdrant.autoconfigure.QdrantVectorStoreAutoConfiguration # 禁用 AI 模块的 Qdrant,手动创建
|
||||
- org.springframework.ai.vectorstore.milvus.autoconfigure.MilvusVectorStoreAutoConfiguration # 禁用 AI 模块的 Milvus,手动创建
|
||||
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: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
max-wait: 60000 # 配置获取连接等待超时的时间,单位:毫秒(1 分钟)
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒(1 分钟)
|
||||
min-evictable-idle-time-millis: 600000 # 配置一个连接在池中最小生存的时间,单位:毫秒(10 分钟)
|
||||
max-evictable-idle-time-millis: 1800000 # 配置一个连接在池中最大生存的时间,单位:毫秒(30 分钟)
|
||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
pool-prepared-statements: true # 是否开启 PreparedStatement 缓存
|
||||
max-pool-prepared-statement-per-connection-size: 20 # 每个连接缓存的 PreparedStatement 数量
|
||||
dynamic:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://111.3.47.177:13306/aiotmini?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
name: aagro-master
|
||||
type: com.alibaba.druid.pool.DruidDataSource # 使用 Druid 数据库连接池
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/aiotagro?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT&allowPublicKeyRetrieval=true&allowMultiQueries=true&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull
|
||||
username: root
|
||||
password: aioitagro
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://111.3.47.177:13306/aiotmini?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
password: root
|
||||
# Druid 连接池配置
|
||||
druid:
|
||||
initial-size: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
stat-view-servlet:
|
||||
enabled: true # 启用监控页面
|
||||
url-pattern: /druid/* # 监控页面 URL
|
||||
login-username: root # 监控页面登录账号
|
||||
login-password: 123456 # 监控页面登录密码
|
||||
filter:
|
||||
stat:
|
||||
enabled: true # 启用 Stat 过滤器
|
||||
log-slow-sql: true # 慢 SQL 记录
|
||||
slow-sql-millis: 100 # 慢 SQL 阈值,单位:毫秒
|
||||
merge-sql: true # 合并多个 DruidDataSource 的监控数据
|
||||
wall:
|
||||
config:
|
||||
drop-table-allow: false # 禁止删除表
|
||||
enabled: true # 启用 Wall 过滤器
|
||||
slave:
|
||||
name: aagro-slave
|
||||
lazy: true # 懒加载
|
||||
type: com.alibaba.druid.pool.DruidDataSource # 使用 Druid 数据库连接池
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/aiotagro?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT&allowPublicKeyRetrieval=true&allowMultiQueries=true&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull
|
||||
username: root
|
||||
password: aioitagro
|
||||
password: root
|
||||
# Druid 连接池配置
|
||||
druid:
|
||||
initial-size: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 111.3.47.177 # 地址
|
||||
port: 16379 # 端口
|
||||
database: 1 # 数据库索引
|
||||
password: aiotagro # 密码,建议生产环境开启
|
||||
# Redis 配置
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1 # 地址
|
||||
port: 6379 # 端口
|
||||
database: 0 # 数据库索引
|
||||
password: # 密码,建议生产环境开启
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 8 # 最大连接数
|
||||
max-idle: 8 # 最大空闲连接数
|
||||
min-idle: 0 # 最小空闲连接数
|
||||
max-wait: -1 # 连接池最大等行时间(使用负值表示没有限制)
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
@@ -164,10 +164,12 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
|
||||
key-prefix: wa # Redis Key 的前缀
|
||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### AIOTAGRO相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
# AIOTAGRO配置项,设置当前项目所有自定义的配置
|
||||
aagro:
|
||||
info:
|
||||
base-package: cn.aagro.ag
|
||||
pay:
|
||||
order-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
|
||||
refund-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
|
||||
|
||||
@@ -6,70 +6,68 @@ spring:
|
||||
autoconfigure:
|
||||
# noinspection SpringBootApplicationYaml
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 默认 local 环境,不开启 Quartz 的自动配置
|
||||
- org.springframework.ai.vectorstore.qdrant.autoconfigure.QdrantVectorStoreAutoConfiguration # 禁用 AI 模块的 Qdrant,手动创建
|
||||
- org.springframework.ai.vectorstore.milvus.autoconfigure.MilvusVectorStoreAutoConfiguration # 禁用 AI 模块的 Milvus,手动创建
|
||||
# 数据源配置项
|
||||
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: 60000 # 配置获取连接等待超时的时间,单位:毫秒(1 分钟)
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒(1 分钟)
|
||||
min-evictable-idle-time-millis: 600000 # 配置一个连接在池中最小生存的时间,单位:毫秒(10 分钟)
|
||||
max-evictable-idle-time-millis: 1800000 # 配置一个连接在池中最大生存的时间,单位:毫秒(30 分钟)
|
||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
pool-prepared-statements: true # 是否开启 PreparedStatement 缓存
|
||||
max-pool-prepared-statement-per-connection-size: 20 # 每个连接缓存的 PreparedStatement 数量
|
||||
dynamic:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
name: aagro-master
|
||||
type: com.alibaba.druid.pool.DruidDataSource # 使用 Druid 数据库连接池
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://111.3.47.177:13306/aiotmini?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
username: root
|
||||
password: aioitagro
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
password: aiotagro
|
||||
# Druid 连接池配置
|
||||
druid:
|
||||
initial-size: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
stat-view-servlet:
|
||||
enabled: true # 启用监控页面
|
||||
url-pattern: /druid/* # 监控页面 URL
|
||||
login-username: root # 监控页面登录账号
|
||||
login-password: 123456 # 监控页面登录密码
|
||||
filter:
|
||||
stat:
|
||||
enabled: true # 启用 Stat 过滤器
|
||||
log-slow-sql: true # 慢 SQL 记录
|
||||
slow-sql-millis: 100 # 慢 SQL 阈值,单位:毫秒
|
||||
merge-sql: true # 合并多个 DruidDataSource 的监控数据
|
||||
wall:
|
||||
config:
|
||||
drop-table-allow: false # 禁止删除表
|
||||
enabled: true # 启用 Wall 过滤器
|
||||
slave:
|
||||
name: aagro-slave
|
||||
lazy: true # 懒加载
|
||||
type: com.alibaba.druid.pool.DruidDataSource # 使用 Druid 数据库连接池
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://111.3.47.177:13306/aiotmini?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: aioitagro
|
||||
# tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!)
|
||||
# url: jdbc:TAOS-RS://127.0.0.1:6041/ruoyi_vue_pro
|
||||
# driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
|
||||
# username: root
|
||||
# password: taosdata
|
||||
# druid:
|
||||
# validation-query: SELECT SERVER_STATUS() # TDengine 数据源的有效性检查 SQL
|
||||
password: aiotagro
|
||||
# Druid 连接池配置
|
||||
druid:
|
||||
initial-size: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 111.3.47.177 # 地址
|
||||
port: 16379 # 端口
|
||||
database: 0 # 数据库索引
|
||||
password: aiotagro # 密码,建议生产环境开启
|
||||
# Redis 配置
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1 # 地址
|
||||
port: 6379 # 端口
|
||||
database: 0 # 数据库索引
|
||||
# password: # 密码,建议生产环境开启
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 8 # 最大连接数
|
||||
max-idle: 8 # 最大空闲连接数
|
||||
min-idle: 0 # 最小空闲连接数
|
||||
max-wait: -1 # 连接池最大等行时间(使用负值表示没有限制)
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
@@ -154,26 +152,26 @@ logging:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
cn.aagro.pp.module.bpm.dal.mysql: debug
|
||||
cn.aagro.pp.module.infra.dal.mysql: debug
|
||||
cn.aagro.pp.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info,避免和 GlobalExceptionHandler 重复打印
|
||||
cn.aagro.pp.module.infra.dal.mysql.job.JobLogMapper: INFO # 配置 JobLogMapper 的日志级别为 info
|
||||
cn.aagro.pp.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info
|
||||
cn.aagro.pp.module.pay.dal.mysql: debug
|
||||
cn.aagro.pp.module.pay.dal.mysql.notify.PayNotifyTaskMapper: INFO # 配置 PayNotifyTaskMapper 的日志级别为 info
|
||||
cn.aagro.pp.module.system.dal.mysql: debug
|
||||
cn.aagro.pp.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
||||
cn.aagro.pp.module.tool.dal.mysql: debug
|
||||
cn.aagro.pp.module.member.dal.mysql: debug
|
||||
cn.aagro.pp.module.trade.dal.mysql: debug
|
||||
cn.aagro.pp.module.promotion.dal.mysql: debug
|
||||
cn.aagro.pp.module.statistics.dal.mysql: debug
|
||||
cn.aagro.pp.module.crm.dal.mysql: debug
|
||||
cn.aagro.pp.module.erp.dal.mysql: debug
|
||||
cn.aagro.pp.module.iot.dal.mysql: debug
|
||||
cn.aagro.pp.module.iot.dal.tdengine: DEBUG
|
||||
cn.aagro.pp.module.iot.service.rule: debug
|
||||
cn.aagro.pp.module.ai.dal.mysql: debug
|
||||
cn.aagro.ag.module.bpm.dal.mysql: debug
|
||||
cn.aagro.ag.module.infra.dal.mysql: debug
|
||||
cn.aagro.ag.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info,避免和 GlobalExceptionHandler 重复打印
|
||||
cn.aagro.ag.module.infra.dal.mysql.job.JobLogMapper: INFO # 配置 JobLogMapper 的日志级别为 info
|
||||
cn.aagro.ag.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info
|
||||
cn.aagro.ag.module.pay.dal.mysql: debug
|
||||
cn.aagro.ag.module.pay.dal.mysql.notify.PayNotifyTaskMapper: INFO # 配置 PayNotifyTaskMapper 的日志级别为 info
|
||||
cn.aagro.ag.module.system.dal.mysql: debug
|
||||
cn.aagro.ag.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
||||
cn.aagro.ag.module.tool.dal.mysql: debug
|
||||
cn.aagro.ag.module.member.dal.mysql: debug
|
||||
cn.aagro.ag.module.trade.dal.mysql: debug
|
||||
cn.aagro.ag.module.promotion.dal.mysql: debug
|
||||
cn.aagro.ag.module.statistics.dal.mysql: debug
|
||||
cn.aagro.ag.module.crm.dal.mysql: debug
|
||||
cn.aagro.ag.module.erp.dal.mysql: debug
|
||||
cn.aagro.ag.module.iot.dal.mysql: debug
|
||||
cn.aagro.ag.module.iot.dal.tdengine: DEBUG
|
||||
cn.aagro.ag.module.iot.service.rule: debug
|
||||
cn.aagro.ag.module.ai.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||
|
||||
debug: false
|
||||
@@ -206,10 +204,12 @@ wx:
|
||||
key-prefix: wa # Redis Key 的前缀
|
||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### AIOTAGRO相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
# AIOTAGRO配置项,设置当前项目所有自定义的配置
|
||||
aagro:
|
||||
info:
|
||||
base-package: cn.aagro.ag
|
||||
captcha:
|
||||
enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试;
|
||||
security:
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
server:
|
||||
port: 38080
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
|
||||
spring:
|
||||
autoconfigure:
|
||||
# noinspection SpringBootApplicationYaml
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- org.springframework.ai.vectorstore.qdrant.autoconfigure.QdrantVectorStoreAutoConfiguration # 禁用 AI 模块的 Qdrant,手动创建
|
||||
- org.springframework.ai.vectorstore.milvus.autoconfigure.MilvusVectorStoreAutoConfiguration # 禁用 AI 模块的 Milvus,手动创建
|
||||
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: 5 # 初始连接数
|
||||
min-idle: 10 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
max-wait: 60000 # 配置获取连接等待超时的时间,单位:毫秒(1 分钟)
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒(1 分钟)
|
||||
min-evictable-idle-time-millis: 600000 # 配置一个连接在池中最小生存的时间,单位:毫秒(10 分钟)
|
||||
max-evictable-idle-time-millis: 1800000 # 配置一个连接在池中最大生存的时间,单位:毫秒(30 分钟)
|
||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
pool-prepared-statements: true # 是否开启 PreparedStatement 缓存
|
||||
max-pool-prepared-statement-per-connection-size: 20 # 每个连接缓存的 PreparedStatement 数量
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://111.3.47.177:13306/aiotmini?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: aiotagro
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://111.3.47.177:13306/aiotmini?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: aiotagro
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 111.3.47.177 # 地址
|
||||
port: 16379 # 端口
|
||||
database: 0 # 数据库索引
|
||||
password: aiotagro # 密码
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
# Quartz 配置项,对应 QuartzProperties 配置类
|
||||
spring:
|
||||
quartz:
|
||||
auto-startup: true # 测试环境,需要开启 Job
|
||||
scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName
|
||||
job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
|
||||
wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
|
||||
properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
|
||||
org:
|
||||
quartz:
|
||||
# Scheduler 相关配置
|
||||
scheduler:
|
||||
instanceName: schedulerName
|
||||
instanceId: AUTO # 自动生成 instance ID
|
||||
# JobStore 相关配置
|
||||
jobStore:
|
||||
# JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
|
||||
class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
|
||||
isClustered: true # 是集群模式
|
||||
clusterCheckinInterval: 15000 # 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
|
||||
misfireThreshold: 60000 # misfire 阀值,单位:毫秒。
|
||||
# 线程池相关配置
|
||||
threadPool:
|
||||
threadCount: 25 # 线程池大小。默认为 10 。
|
||||
threadPriority: 5 # 线程优先级
|
||||
class: org.quartz.simpl.SimpleThreadPool # 线程池类型
|
||||
jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置
|
||||
initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
|
||||
|
||||
--- #################### 消息队列相关 ####################
|
||||
|
||||
# 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 地址,可以设置多个,以逗号分隔
|
||||
|
||||
--- #################### 服务保障相关配置 ####################
|
||||
|
||||
# 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:
|
||||
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
# Spring Boot Admin Server 服务端的相关配置
|
||||
context-path: /admin # 配置 Spring
|
||||
|
||||
# 日志文件配置
|
||||
logging:
|
||||
file:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
|
||||
--- #################### 微信公众号相关配置 ####################
|
||||
wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
|
||||
mp:
|
||||
# 公众号配置(必填)
|
||||
app-id: wx041349c6f39b268b
|
||||
secret: 5abee519483bc9f8cb37ce280e814bd0
|
||||
# 存储配置,解决 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: wx63c280fe3248a3e7
|
||||
secret: 6f270509224a7ae1296bbf1c8cb97aed
|
||||
config-storage:
|
||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
||||
key-prefix: wa # Redis Key 的前缀
|
||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
aagro:
|
||||
pay:
|
||||
order-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
|
||||
refund-notify-url: http://yunai.natapp1.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
|
||||
transfer-notify-url: https://yunai.natapp1.cc/admin-api/pay/notify/transfer # 支付渠道的【转账】回调地址
|
||||
demo: false # 开启演示模式
|
||||
tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc
|
||||
|
||||
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_PROGRAM: # 微信小程序
|
||||
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 分钟
|
||||
@@ -3,7 +3,7 @@ spring:
|
||||
name: aagro-server
|
||||
|
||||
profiles:
|
||||
active: prod
|
||||
active: local
|
||||
|
||||
main:
|
||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||||
@@ -108,7 +108,7 @@ aj:
|
||||
cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存
|
||||
timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行
|
||||
type: blockPuzzle # 验证码类型 default 三种都实例化。blockPuzzle 滑块拼图、clickWord 文字点选、pictureWord 文本输入
|
||||
water-mark: 芋道源码 # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode
|
||||
water-mark: AIOTAGRO # 右下角水印文字(我的水印),可使用 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接口锁定
|
||||
@@ -253,12 +253,12 @@ aagro:
|
||||
enable: true
|
||||
api-key: sk-40500e52840f4d24b956d0b1d80d9abe
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### AIOTAGRO相关配置 ####################
|
||||
|
||||
aagro:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: cn.aagro.pp
|
||||
base-package: cn.aagro.ag
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.aagro.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
@@ -291,7 +291,7 @@ aagro:
|
||||
topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic
|
||||
consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group
|
||||
swagger:
|
||||
title: 芋道快速开发平台
|
||||
title: AIOTAGRO快速开发平台
|
||||
description: 提供管理后台、用户 App 的所有功能
|
||||
version: ${aagro.info.version}
|
||||
url: ${aagro.web.admin-ui.url}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.aagro.pp;
|
||||
package cn.aagro.ag;
|
||||
|
||||
import cn.hutool.core.io.FileTypeUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.aagro.pp.framework.common.util.collection.SetUtils;
|
||||
import cn.aagro.ag.framework.common.util.collection.SetUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
@@ -20,14 +20,14 @@ import static java.io.File.separator;
|
||||
* <p>
|
||||
* 通过修改 groupIdNew、artifactIdNew、projectBaseDirNew 三个变量
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author AIOTAGRO
|
||||
*/
|
||||
@Slf4j
|
||||
public class ProjectReactor {
|
||||
|
||||
private static final String GROUP_ID = "cn.aagro.gg";
|
||||
private static final String GROUP_ID = "cn.aagro.aa";
|
||||
private static final String ARTIFACT_ID = "aagro";
|
||||
private static final String PACKAGE_NAME = "cn.aagro.pp";
|
||||
private static final String PACKAGE_NAME = "cn.aagro.ag";
|
||||
private static final String TITLE = "AIOTAGRO管理系统";
|
||||
|
||||
/**
|
||||
@@ -43,9 +43,9 @@ public class ProjectReactor {
|
||||
log.info("[main][原项目路劲改地址 ({})]", projectBaseDir);
|
||||
|
||||
// ========== 配置,需要你手动修改 ==========
|
||||
String groupIdNew = "cn.aagro.gg";
|
||||
String groupIdNew = "cn.aagro.aa";
|
||||
String artifactIdNew = "aagro";
|
||||
String packageNameNew = "cn.aagro.pp";
|
||||
String packageNameNew = "cn.aagro.ag";
|
||||
String titleNew = "AIOTAGRO管理系统";
|
||||
String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后,“新”项目所在的目录
|
||||
log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew);
|
||||
Reference in New Issue
Block a user