【jeecgboot 3.7.0里程碑版本发布——合并springboot3sas分支】

Merge remote-tracking branch 'origin/springboot3' into springboot3_sas

# Conflicts:
#	.gitignore
#	db/tables_nacos.sql
#	jeecg-boot-base-core/pom.xml
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/aspect/AutoLogAspect.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/common/exception/JeecgBootExceptionHandler.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/config/DruidWallConfigRegister.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/filters/JwtFilter.java
#	jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/service/impl/BaseCommonServiceImpl.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDictController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysTableWhiteListController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysTenantController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysAnnouncementServiceImpl.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantPackServiceImpl.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantServiceImpl.java
#	jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserDepartServiceImpl.java
#	jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml
#	jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml
#	jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml
#	pom.xml
This commit is contained in:
JEECG
2024-06-22 19:55:35 +08:00
328 changed files with 12050 additions and 53106 deletions

View File

@ -11,6 +11,6 @@ WORKDIR /jeecg-boot
EXPOSE 8080
#ADD ./src/main/resources/jeecg ./config/jeecg
ADD ./target/jeecg-system-start-3.6.1.jar ./
ADD ./target/jeecg-system-start-3.7.0.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar jeecg-system-start-3.6.1.jar
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar jeecg-system-start-3.7.0.jar

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-module-system</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.6.1</version>
<version>3.7.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -24,6 +24,13 @@
<artifactId>jeecg-module-demo</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<!-- flyway 数据库自动升级
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>7.15.0</version>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -4,6 +4,7 @@ import org.jeecgframework.codegenerate.window.CodeWindow;
/**
* @Title: 单表代码生成器入口
* 【 GUI模式功能弱一些请优先使用Online代码生成 】
* @Author 张代浩
* @site www.jeecg.com
* @Version:V1.0.1

View File

@ -9,6 +9,8 @@ import org.jeecgframework.codegenerate.generate.pojo.onetomany.SubTableVo;
/**
* 代码生成器入口【一对多】
*
* 【 GUI模式功能弱一些请优先使用Online代码生成 】
* @Author 张代浩
* @site www.jeecg.com
*

View File

@ -0,0 +1,134 @@
package org.jeecg.config.flyway;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import javax.sql.DataSource;
import java.util.Map;
/**
* @Description: 初始化flyway配置 修改之后支持多数据源,当出现异常时打印日志,不影响项目启动
*
* @author: wangshuai
* @date: 2024/3/12 10:03
*/
@Slf4j
@Configuration
public class FlywayConfig {
@Autowired
private DataSource dataSource;
@Autowired
private Environment environment;
/**
* 是否开启flyway
*/
@Value("${spring.flyway.enabled:false}")
private Boolean enabled;
/**
* 编码格式默认UTF-8
*/
@Value("${spring.flyway.encoding:UTF-8}")
private String encoding;
/**
* 迁移sql脚本文件存放路径官方默认db/migration
*/
@Value("${spring.flyway.locations:}")
private String locations;
/**
* 迁移sql脚本文件名称的前缀默认V
*/
@Value("${spring.flyway.sql-migration-prefix:V}")
private String sqlMigrationPrefix;
/**
* 迁移sql脚本文件名称的分隔符默认2个下划线__
*/
@Value("${spring.flyway.sql-migration-separator:__}")
private String sqlMigrationSeparator;
/**
* 文本前缀
*/
@Value("${spring.flyway.placeholder-prefix:#(}")
private String placeholderPrefix;
/**
* 文本后缀
*/
@Value("${spring.flyway.placeholder-suffix:)}")
private String placeholderSuffix;
/**
* 迁移sql脚本文件名称的后缀
*/
@Value("${spring.flyway.sql-migration-suffixes:.sql}")
private String sqlMigrationSuffixes;
/**
* 迁移时是否进行校验默认true
*/
@Value("${spring.flyway.validate-on-migrate:true}")
private Boolean validateOnMigrate;
/**
* 当迁移发现数据库非空且存在没有元数据的表时自动执行基准迁移新建schema_version表
*/
@Value("${spring.flyway.baseline-on-migrate:true}")
private Boolean baselineOnMigrate;
/**
* 是否关闭要清除已有库下的表功能,生产环境必须为true,否则会删库,非常重要!!!
*/
@Value("${spring.flyway.clean-disabled:true}")
private Boolean cleanDisabled;
// @Bean
// public void migrate() {
// if(!enabled){
// return;
// }
//
// DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
// Map<String, DataSource> dataSources = ds.getDataSources();
// dataSources.forEach((k, v) -> {
// if("master".equals(k)){
// String databaseType = environment.getProperty("spring.datasource.dynamic.datasource." + k + ".url");
// if (databaseType != null && databaseType.contains("mysql")) {
// try {
// Flyway flyway = Flyway.configure()
// .dataSource(v)
// .locations(locations)
// .encoding(encoding)
// .sqlMigrationPrefix(sqlMigrationPrefix)
// .sqlMigrationSeparator(sqlMigrationSeparator)
// .placeholderPrefix(placeholderPrefix)
// .placeholderSuffix(placeholderSuffix)
// .sqlMigrationSuffixes(sqlMigrationSuffixes)
// .validateOnMigrate(validateOnMigrate)
// .baselineOnMigrate(baselineOnMigrate)
// .cleanDisabled(cleanDisabled)
// .load();
// flyway.migrate();
// log.info("【升级提示】平台集成了MySQL库的Flyway数据库版本自动升级! ");
// } catch (FlywayException e) {
// log.error("【升级提示】flyway执行sql脚本失败", e);
// }
// } else {
// log.warn("【升级提示】平台只集成了MySQL库的Flyway实现了数据库版本自动升级! 其他类型的数据库,您可以考虑手工升级~");
// }
// }
// });
// }
}

View File

@ -22,9 +22,32 @@ management:
endpoints:
web:
exposure:
include: metrics,httptrace
include: metrics,httpexchanges,httptrace-new
spring:
# flyway配置
flyway:
# 是否启用flyway
enabled: true
# 编码格式默认UTF-8
encoding: UTF-8
# 迁移sql脚本文件存放路径官方默认db/migration
locations: classpath:flyway/sql/mysql
# 迁移sql脚本文件名称的前缀默认V
sql-migration-prefix: V
# 迁移sql脚本文件名称的分隔符默认2个下划线__
sql-migration-separator: __
# 避免带${}sql执行失败
placeholder-prefix: '#('
placeholder-suffix: )
# 迁移sql脚本文件名称的后缀
sql-migration-suffixes: .sql
# 迁移时是否进行校验默认true
validate-on-migrate: true
# 当迁移发现数据库非空且存在没有元数据的表时自动执行基准迁移新建schema_version表
baseline-on-migrate: true
# 是否关闭要清除已有库下的表功能,生产环境必须为true,否则会删库,非常重要!!!
clean-disabled: true
servlet:
multipart:
max-file-size: 10MB
@ -100,7 +123,9 @@ spring:
resource:
static-locations: classpath:/static/,classpath:/public/
autoconfigure:
exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
exclude:
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
datasource:
druid:
stat-view-servlet:
@ -116,7 +141,7 @@ spring:
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
maxActive: 20
maxActive: 1000
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
@ -131,7 +156,10 @@ spring:
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters去掉后监控界面sql无法统计'wall'用于防火墙
filters: stat,wall,slf4j
filters: stat,slf4j
# 允许SELECT语句的WHERE子句是一个永真条件
wall:
selectWhereAlwayTrueCheck: false
# 打开mergeSql功能慢SQL记录
stat:
merge-sql: true
@ -154,10 +182,10 @@ spring:
database: 0
host: 127.0.0.1
port: 6379
password:
password:
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
@ -184,7 +212,7 @@ jeecg:
# 签名密钥串(前后端要一致,正式发布请自行修改)
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
#签名拦截接口
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode
# 本地local、Miniominio、阿里云alioss
uploadType: local
# 前端访问地址
@ -239,15 +267,30 @@ jeecg:
#分布式锁配置
redisson:
address: 127.0.0.1:6379
password:
password:
type: STANDALONE
enabled: true
# ai-chat
ai-chat:
# 是否开启;必须。
enabled: false
# openAi接口秘钥填写自己的apiKey必须。
apiKey: ""
# openAi域名有代理就填代理的域名。默认openAI官方apiHost
apiHost: "https://api.openai.com"
# 超时时间单位:s。默认 60s
timeout: 60
# 本地代理地址
# proxy:
# host: "http://127.0.0.1"
# port: "7890"
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas
#Mybatis输出sql日志
logging:
level:
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
#swagger
knife4j:

View File

@ -22,16 +22,39 @@ management:
endpoints:
web:
exposure:
include: metrics,httptrace
include: metrics,httpexchanges,httptrace-new
spring:
# flyway配置
flyway:
# 是否启用flyway
enabled: false
# 编码格式默认UTF-8
encoding: UTF-8
# 迁移sql脚本文件存放路径官方默认db/migration
locations: classpath:flyway/sql/mysql
# 迁移sql脚本文件名称的前缀默认V
sql-migration-prefix: V
# 迁移sql脚本文件名称的分隔符默认2个下划线__
sql-migration-separator: __
# 避免带${}sql执行失败
placeholder-prefix: '#('
placeholder-suffix: )
# 迁移sql脚本文件名称的后缀
sql-migration-suffixes: .sql
# 迁移时是否进行校验默认true
validate-on-migrate: true
# 当迁移发现数据库非空且存在没有元数据的表时自动执行基准迁移新建schema_version表
baseline-on-migrate: true
# 是否关闭要清除已有库下的表功能,生产环境必须为true,否则会删库,非常重要!!!
clean-disabled: true
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
mail:
host: smtp.163.com
username: ??
username: jeecgos@163.com
password: ??
properties:
mail:
@ -100,7 +123,9 @@ spring:
resource:
static-locations: classpath:/static/,classpath:/public/
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
exclude:
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
datasource:
druid:
stat-view-servlet:
@ -131,7 +156,10 @@ spring:
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters去掉后监控界面sql无法统计'wall'用于防火墙
filters: stat,wall,slf4j
filters: stat,slf4j
# 允许SELECT语句的WHERE子句是一个永真条件
wall:
selectWhereAlwayTrueCheck: false
# 打开mergeSql功能慢SQL记录
stat:
merge-sql: true
@ -157,7 +185,7 @@ spring:
password: ''
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
@ -184,7 +212,7 @@ jeecg:
# 签名密钥串(前后端要一致,正式发布请自行修改)
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
#签名拦截接口
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode
# local\minio\alioss
uploadType: alioss
# 前端访问地址
@ -219,7 +247,7 @@ jeecg:
#大屏报表参数设置
jmreport:
#多租户模式,默认值为空(created:按照创建人隔离、tenant:按照租户隔离) (v1.6.2+ 新增)
saasMode: created
saasMode:
# 平台上线安全配置(v1.6.2+ 新增)
firewall:
# 数据源安全 (开启后不允许使用平台数据源、SQL解析加签并且不允许查询数据库)
@ -249,13 +277,14 @@ cas:
#Mybatis输出sql日志
logging:
level:
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
#swagger
knife4j:
#开启增强配置
enable: true
#开启生产环境屏蔽
production: false
production: true
basic:
enable: true
username: jeecg

View File

@ -22,16 +22,39 @@ management:
endpoints:
web:
exposure:
include: metrics,httptrace
include: metrics,httpexchanges,httptrace-new
spring:
# flyway配置
flyway:
# 是否启用flyway
enabled: false
# 编码格式默认UTF-8
encoding: UTF-8
# 迁移sql脚本文件存放路径官方默认db/migration
locations: classpath:flyway/sql/mysql
# 迁移sql脚本文件名称的前缀默认V
sql-migration-prefix: V
# 迁移sql脚本文件名称的分隔符默认2个下划线__
sql-migration-separator: __
# 避免带${}sql执行失败
placeholder-prefix: '#('
placeholder-suffix: )
# 迁移sql脚本文件名称的后缀
sql-migration-suffixes: .sql
# 迁移时是否进行校验默认true
validate-on-migrate: true
# 当迁移发现数据库非空且存在没有元数据的表时自动执行基准迁移新建schema_version表
baseline-on-migrate: true
# 是否关闭要清除已有库下的表功能,生产环境必须为true,否则会删库,非常重要!!!
clean-disabled: true
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
mail:
host: smtp.163.com
username: ??
username: jeecgos@163.com
password: ??
properties:
mail:
@ -100,7 +123,9 @@ spring:
resource:
static-locations: classpath:/static/,classpath:/public/
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
exclude:
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
datasource:
druid:
stat-view-servlet:
@ -116,7 +141,7 @@ spring:
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
maxActive: 20
maxActive: 1000
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
@ -131,7 +156,10 @@ spring:
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters去掉后监控界面sql无法统计'wall'用于防火墙
filters: stat,wall,slf4j
filters: stat,slf4j
# 允许SELECT语句的WHERE子句是一个永真条件
wall:
selectWhereAlwayTrueCheck: false
# 打开mergeSql功能慢SQL记录
stat:
merge-sql: true
@ -151,12 +179,12 @@ spring:
#redis 配置
redis:
database: 0
host: 192.168.1.199
host: 192.168.1.188
port: 6379
password: ''
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
@ -183,7 +211,7 @@ jeecg:
# 签名密钥串(前后端要一致,正式发布请自行修改)
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
#签名拦截接口
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode
# local\minio\alioss
uploadType: local
# 前端访问地址
@ -218,7 +246,7 @@ jeecg:
#大屏报表参数设置
jmreport:
#多租户模式,默认值为空(created:按照创建人隔离、tenant:按照租户隔离) (v1.6.2+ 新增)
saasMode: created
saasMode:
# 平台上线安全配置(v1.6.2+ 新增)
firewall:
# 数据源安全 (开启后不允许使用平台数据源、SQL解析加签并且不允许查询数据库)
@ -245,6 +273,7 @@ jeecg:
#Mybatis输出sql日志
logging:
level:
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
#cas单点登录
cas:

View File

@ -9,6 +9,9 @@ ${AnsiColor.BRIGHT_BLUE}
${AnsiColor.BRIGHT_GREEN}
Jeecg Boot Version: 3.6.1
Jeecg Boot Version: 3.7.0
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
产品官网: www.jeecg.com
版权所属: 北京国炬信息技术有限公司
公司官网: www.guojusoft.com
${AnsiColor.BLACK}

View File

@ -0,0 +1,18 @@
# SQL文件命名规则
`V[年月日]_[序号]__[模块名缩写]_[操作类型]_[业务描述].sql`
例如:
```
V20240104_1__easyoa_add_field_attendance.sql
R__202402_drag_update_template.sql
```
### SQL命名规则说明
- 1.仅需要执行一次的以大写“V”开头
- 2.需要执行多次的以大写“R”开头命名如R__clean.sqlR的脚本只要改变了就会执行
- 3.V开头的比R开头的优先级要高。
### 命名规则示例
参考博客:
https://blog.csdn.net/Jiao1225/article/details/129590660

View File

@ -0,0 +1,5 @@
-- 补充缺少的请求权限配置
INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('f15543b0263cf6c5fac85afdd3eba3f2', '3f915b2769fc80648e92d04e84ca059d', '用户导入', '', NULL, 0, NULL, NULL, 2, 'system:user:import', '1', 1.00, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2019-05-13 19:15:27', 'admin', '2022-06-30 15:05:12', 0, 0, '1', 0);
INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1801954937339428865', '1460888189937176577', '测试数据源连接', NULL, NULL, 0, NULL, NULL, 2, 'online:report:testConnection', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-06-15 20:28:30', NULL, NULL, 0, 0, '1', 0);
INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1535227149789184001', '1455101470794850305', '新建SQL增强', NULL, NULL, 0, NULL, NULL, 2, 'online:form:enhanceSql:save', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2022-06-10 19:47:30', 'admin', '2022-06-30 13:42:36', 0, 0, '1', 0);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,6 +18,7 @@ database_name=jeecg-boot
#username=postgres
#password=postgres
#database_name=jeecg
#schemaName=public
#SQLServer2005\u4ee5\u4e0a
#diver_name=org.hibernate.dialect.SQLServerDialect

View File

@ -6,6 +6,7 @@ import org.junit.Test;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Base64;
/**
* 字符串处理测试
@ -44,5 +45,32 @@ public class TestStr {
valArray.add("qwe");
System.out.println("值: " + StringUtils.join(valArray, ","));
}
@Test
public void testSql() {
String sql = "select * from sys_user where sex = ${sex}";
sql = sql.replaceAll("'?\\$\\{sex}'?","1");
System.out.println(sql);
}
@Test
public void base64(){
String encodedString = "5L+d5a2Y5aSx6LSl77yM5YWN6LS554mI5pyA5aSa5Yib5bu6ezB95p2h6L+e5o6l77yM6K+35Y2H57qn5ZWG5Lia54mI77yB";
byte[] decodedBytes = Base64.getDecoder().decode(encodedString);
String decodedString = new String(decodedBytes);
String tipMsg = MessageFormat.format(decodedString, 10);
System.out.println(tipMsg);
}
/**
* 正则测试字符串只保存中文和数字和字母
*/
@Test
public void testSpecialChar() {
String str = "Hello, World! 你好这是一段特殊符号的测试This is a test string with special characters: @#$%^&*";
// 使用正则表达式替换特殊字符
String replacedStr = str.replaceAll("[^a-zA-Z0-9\\u4e00-\\u9fa5]", "");
System.out.println("Replaced String: " + replacedStr);
}
}