fix bugs
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package org.springblade.test;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springblade.core.test.BladeBootTest;
|
||||
import org.springblade.core.test.BladeSpringExtension;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.flow.engine.entity.FlowModel;
|
||||
import org.springblade.flow.engine.service.FlowEngineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Blade单元测试
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@ExtendWith(BladeSpringExtension.class)
|
||||
@BladeBootTest(appName = "blade-runner", enableLoader = true)
|
||||
public class BladeTest {
|
||||
|
||||
@Autowired
|
||||
private FlowEngineService service;
|
||||
|
||||
//@Test
|
||||
public void contextLoads() {
|
||||
System.out.println("=====数据迁移启动=====");
|
||||
|
||||
// 获取 ACT_DE_MODEL 表需要转换的数据
|
||||
List<FlowModel> list = service.list();
|
||||
// 循环转换
|
||||
list.forEach(flowModel -> {
|
||||
if (StringUtil.isBlank(flowModel.getModelEditorXml())) {
|
||||
service.update(Wrappers.<FlowModel>lambdaUpdate()
|
||||
.set(FlowModel::getModelEditorXml, new String(service.getModelEditorXML(flowModel)))
|
||||
.ge(FlowModel::getId, flowModel.getId())
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
System.out.println("=====数据迁移完毕=====");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
package org.springblade.test;
|
||||
|
||||
|
||||
import org.springblade.develop.constant.DevelopConstant;
|
||||
import org.springblade.develop.support.BladeCodeGenerator;
|
||||
|
||||
/**
|
||||
* 代码生成器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class CodeGenerator {
|
||||
|
||||
/**
|
||||
* 代码生成的模块名
|
||||
*/
|
||||
public static String CODE_NAME = "自定义模块";
|
||||
/**
|
||||
* 代码所在服务名
|
||||
*/
|
||||
public static String SERVICE_NAME = "blade-desk";
|
||||
/**
|
||||
* 代码生成的包名
|
||||
*/
|
||||
public static String PACKAGE_NAME = "org.springblade.desk";
|
||||
/**
|
||||
* 前端代码生成风格
|
||||
*/
|
||||
public static String CODE_STYLE = DevelopConstant.SABER_NAME;
|
||||
/**
|
||||
* 前端代码生成地址
|
||||
*/
|
||||
public static String PACKAGE_WEB_DIR = "/Users/chill/Workspaces/product/Sword";
|
||||
/**
|
||||
* 需要去掉的表前缀
|
||||
*/
|
||||
public static String[] TABLE_PREFIX = {"blade_"};
|
||||
/**
|
||||
* 需要生成的表名(两者只能取其一)
|
||||
*/
|
||||
public static String[] INCLUDE_TABLES = {"blade_notice"};
|
||||
/**
|
||||
* 需要排除的表名(两者只能取其一)
|
||||
*/
|
||||
public static String[] EXCLUDE_TABLES = {};
|
||||
/**
|
||||
* 是否包含基础业务字段
|
||||
*/
|
||||
public static Boolean HAS_SUPER_ENTITY = Boolean.TRUE;
|
||||
/**
|
||||
* 基础业务字段
|
||||
*/
|
||||
public static String[] SUPER_ENTITY_COLUMNS = {"id", "create_time", "create_user", "create_dept", "update_time", "update_user", "status", "is_deleted"};
|
||||
|
||||
/**
|
||||
* RUN THIS
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
BladeCodeGenerator generator = new BladeCodeGenerator();
|
||||
generator.setCodeName(CODE_NAME);
|
||||
generator.setServiceName(SERVICE_NAME);
|
||||
generator.setCodeStyle(CODE_STYLE);
|
||||
generator.setPackageName(PACKAGE_NAME);
|
||||
generator.setPackageWebDir(PACKAGE_WEB_DIR);
|
||||
generator.setTablePrefix(TABLE_PREFIX);
|
||||
generator.setIncludeTables(INCLUDE_TABLES);
|
||||
generator.setExcludeTables(EXCLUDE_TABLES);
|
||||
generator.setHasSuperEntity(HAS_SUPER_ENTITY);
|
||||
generator.setSuperEntityColumns(SUPER_ENTITY_COLUMNS);
|
||||
generator.run();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.springblade.test;
|
||||
|
||||
import org.springblade.core.tool.utils.AesUtil;
|
||||
import org.springblade.core.tool.utils.DesUtil;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
|
||||
/**
|
||||
* Key生成器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class CryptoKeyGenerator {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("=======================================================");
|
||||
System.out.println("====== blade.token.crypto-key 的值从中挑选一个便可 =======");
|
||||
System.out.println("=======================================================");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String cryptoKey = AesUtil.genAesKey();
|
||||
System.out.println("BladeX CryptoKey:[" + cryptoKey + "] ");
|
||||
}
|
||||
System.out.println("=======================================================");
|
||||
System.out.println(StringPool.EMPTY);
|
||||
System.out.println("=======================================================");
|
||||
System.out.println("===== blade.api.crypto.aes-key 的值从中挑选一个便可 ======");
|
||||
System.out.println("=======================================================");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String AesKey = AesUtil.genAesKey();
|
||||
System.out.println("BladeX AesKey:[" + AesKey + "] ");
|
||||
}
|
||||
System.out.println("=======================================================");
|
||||
System.out.println(StringPool.EMPTY);
|
||||
System.out.println("=======================================================");
|
||||
System.out.println("===== blade.api.crypto.des-key 的值从中挑选一个便可 ======");
|
||||
System.out.println("=======================================================");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String DesKey = DesUtil.genDesKey();
|
||||
System.out.println("BladeX DesKey:[" + DesKey + "] ");
|
||||
}
|
||||
System.out.println("=======================================================");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.springblade.test;
|
||||
|
||||
import org.springblade.core.tool.utils.RandomType;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
|
||||
/**
|
||||
* signKey生成器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class SignKeyGenerator {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("=======================================================");
|
||||
System.out.println("====== blade.token.sign-key 的值从中挑选一个便可 =========");
|
||||
System.out.println("=======================================================");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String signKey = StringUtil.random(32, RandomType.ALL);
|
||||
System.out.println("BladeX SignKey:[" + signKey + "] ");
|
||||
}
|
||||
System.out.println("=======================================================");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springblade.test.http;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springblade.core.http.CssQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class OsChina {
|
||||
|
||||
@CssQuery(value = "head > title", attr = "text")
|
||||
private String title;
|
||||
|
||||
@CssQuery(value = "#v_news .page .news", inner = true)
|
||||
private List<VNews> vNews;
|
||||
|
||||
@CssQuery(value = ".blog-container .blog-list div", inner = true)
|
||||
private List<VBlog> vBlogList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.springblade.test.http;
|
||||
|
||||
import org.springblade.core.http.HttpRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OsChinaTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 同步,异常返回 null
|
||||
OsChina oschina = HttpRequest.get("https://www.oschina.net")
|
||||
.execute()
|
||||
.onSuccess(responseSpec -> responseSpec.asDomValue(OsChina.class));
|
||||
if (oschina == null) {
|
||||
return;
|
||||
}
|
||||
System.out.println(oschina.getTitle());
|
||||
|
||||
System.out.println("热门新闻");
|
||||
|
||||
List<VNews> vNews = oschina.getVNews();
|
||||
for (VNews vNew : vNews) {
|
||||
System.out.println("title:\t" + vNew.getTitle());
|
||||
System.out.println("href:\t" + vNew.getHref());
|
||||
System.out.println("时间:\t" + vNew.getDate());
|
||||
}
|
||||
|
||||
System.out.println("热门博客");
|
||||
List<VBlog> vBlogList = oschina.getVBlogList();
|
||||
for (VBlog vBlog : vBlogList) {
|
||||
System.out.println("title:\t" + vBlog.getTitle());
|
||||
System.out.println("href:\t" + vBlog.getHref());
|
||||
System.out.println("阅读数:\t" + vBlog.getRead());
|
||||
System.out.println("评价数:\t" + vBlog.getPing());
|
||||
System.out.println("点赞数:\t" + vBlog.getZhan());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.springblade.test.http;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springblade.core.http.CssQuery;
|
||||
|
||||
/**
|
||||
* 热门博客
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class VBlog {
|
||||
|
||||
@CssQuery(value = "a", attr = "title")
|
||||
private String title;
|
||||
|
||||
@CssQuery(value = "a", attr = "href")
|
||||
private String href;
|
||||
|
||||
//1341阅/9评/4赞
|
||||
@CssQuery(value = "span", attr = "text", regex = "^\\d+")
|
||||
private Integer read;
|
||||
|
||||
@CssQuery(value = "span", attr = "text", regex = "(\\d*).*/(\\d*).*/(\\d*).*", regexGroup = 2)
|
||||
private Integer ping;
|
||||
|
||||
@CssQuery(value = "span", attr = "text", regex = "(\\d*).*/(\\d*).*/(\\d*).*", regexGroup = 3)
|
||||
private Integer zhan;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.springblade.test.http;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springblade.core.http.CssQuery;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class VNews {
|
||||
|
||||
@CssQuery(value = "a", attr = "title")
|
||||
private String title;
|
||||
|
||||
@CssQuery(value = "a", attr = "href")
|
||||
private String href;
|
||||
|
||||
@CssQuery(value = ".news-date", attr = "text")
|
||||
@DateTimeFormat(pattern = "MM/dd")
|
||||
private Date date;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
package org.springblade.test.launch;
|
||||
|
||||
import org.springblade.core.auto.service.AutoService;
|
||||
import org.springblade.core.launch.service.LauncherService;
|
||||
import org.springblade.core.launch.utils.PropsUtil;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* 启动参数拓展
|
||||
*
|
||||
* @author smallchil
|
||||
*/
|
||||
@AutoService(LauncherService.class)
|
||||
public class LauncherTestServiceImpl implements LauncherService {
|
||||
|
||||
@Override
|
||||
public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
|
||||
Properties props = System.getProperties();
|
||||
PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "false");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
#数据源配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
##redis 单机环境配置
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
database: 0
|
||||
ssl:
|
||||
enabled: false
|
||||
##redis 集群环境配置
|
||||
#cluster:
|
||||
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
|
||||
# commandTimeout: 5000
|
||||
datasource:
|
||||
# MySql
|
||||
url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
# PostgreSQL
|
||||
#url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
|
||||
#username: postgres
|
||||
#password: 123456
|
||||
# Oracle
|
||||
#url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
|
||||
#username: BLADEX_BOOT
|
||||
#password: BLADEX_BOOT
|
||||
# SqlServer
|
||||
#url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bladex_boot
|
||||
#username: bladex_boot
|
||||
#password: bladex_boot
|
||||
# DaMeng
|
||||
#url: jdbc:dm://127.0.0.1:5236/BLADEX_BOOT?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
||||
#username: BLADEX_BOOT
|
||||
#password: BLADEX_BOOT
|
||||
# YashanDB
|
||||
#url: jdbc:yasdb://127.0.0.1:1688/BLADEX_BOOT
|
||||
#username: BLADEX_BOOT
|
||||
#password: BLADEX_BOOT
|
||||
|
||||
#第三方登陆
|
||||
social:
|
||||
enabled: true
|
||||
domain: http://127.0.0.1:1888
|
||||
|
||||
#blade配置
|
||||
blade:
|
||||
#分布式锁配置
|
||||
lock:
|
||||
##是否启用分布式锁
|
||||
enabled: false
|
||||
##redis服务地址
|
||||
address: redis://127.0.0.1:6379
|
||||
#本地文件上传
|
||||
file:
|
||||
remote-mode: true
|
||||
upload-domain: http://localhost:8999
|
||||
remote-path: /usr/share/nginx/html
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#数据源配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
##redis 单机环境配置
|
||||
##将docker脚本部署的redis服务映射为宿主机ip
|
||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
database: 0
|
||||
ssl:
|
||||
enabled: false
|
||||
##redis 集群环境配置
|
||||
#cluster:
|
||||
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
|
||||
# commandTimeout: 5000
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
|
||||
#第三方登陆
|
||||
social:
|
||||
enabled: true
|
||||
domain: http://127.0.0.1:1888
|
||||
|
||||
#blade配置
|
||||
blade:
|
||||
#分布式锁配置
|
||||
lock:
|
||||
##是否启用分布式锁
|
||||
enabled: false
|
||||
##将docker脚本部署的redis服务映射为宿主机ip
|
||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||
address: redis://127.0.0.1:6379
|
||||
password: 123456
|
||||
#本地文件上传
|
||||
file:
|
||||
remote-mode: true
|
||||
upload-domain: http://localhost:8999
|
||||
remote-path: /usr/share/nginx/html
|
||||
@@ -0,0 +1,42 @@
|
||||
#数据源配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
##redis 单机环境配置
|
||||
##将docker脚本部署的redis服务映射为宿主机ip
|
||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
database: 0
|
||||
ssl:
|
||||
enabled: false
|
||||
##redis 集群环境配置
|
||||
#cluster:
|
||||
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
|
||||
# commandTimeout: 5000
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
|
||||
#第三方登陆
|
||||
social:
|
||||
enabled: true
|
||||
domain: http://127.0.0.1:1888
|
||||
|
||||
#blade配置
|
||||
blade:
|
||||
#分布式锁配置
|
||||
lock:
|
||||
##是否启用分布式锁
|
||||
enabled: false
|
||||
##将docker脚本部署的redis服务映射为宿主机ip
|
||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||
address: redis://127.0.0.1:6379
|
||||
password: 123456
|
||||
#本地文件上传
|
||||
file:
|
||||
remote-mode: true
|
||||
upload-domain: http://localhost:8999
|
||||
remote-path: /usr/share/nginx/html
|
||||
@@ -0,0 +1,288 @@
|
||||
#服务器配置
|
||||
server:
|
||||
port: 80
|
||||
undertow:
|
||||
threads:
|
||||
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
|
||||
io: 16
|
||||
# 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
|
||||
worker: 400
|
||||
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
|
||||
buffer-size: 1024
|
||||
# 是否分配的直接内存
|
||||
direct-buffers: true
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#driver-class-name: org.postgresql.Driver
|
||||
#driver-class-name: oracle.jdbc.OracleDriver
|
||||
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
#driver-class-name: dm.jdbc.driver.DmDriver
|
||||
#driver-class-name: com.yashandb.jdbc.Driver
|
||||
druid:
|
||||
# MySql、PostgreSQL、SqlServer、DaMeng校验
|
||||
validation-query: select 1
|
||||
# Oracle、YashanDB校验
|
||||
#oracle: true
|
||||
#validation-query: select 1 from dual
|
||||
validation-query-timeout: 2000
|
||||
initial-size: 5
|
||||
max-active: 20
|
||||
min-idle: 5
|
||||
max-wait: 60000
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
test-while-idle: true
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
login-username: blade
|
||||
login-password: 1qaz@WSX
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: /*
|
||||
exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
|
||||
session-stat-enable: true
|
||||
session-stat-max-count: 10
|
||||
|
||||
# mybatis
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:org/springblade/**/mapper/*Mapper.xml
|
||||
#实体扫描,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: org.springblade.**.entity
|
||||
#typeEnumsPackage: org.springblade.dashboard.entity.enums
|
||||
global-config:
|
||||
# 关闭MP3.0自带的banner
|
||||
banner: false
|
||||
db-config:
|
||||
#主键类型 0:"数据库ID自增", 1:"不操作", 2:"用户输入ID",3:"数字型snowflake", 4:"全局唯一ID UUID", 5:"字符串型snowflake";
|
||||
id-type: assign_id
|
||||
#字段策略
|
||||
insert-strategy: not_null
|
||||
update-strategy: not_null
|
||||
where-strategy: not_null
|
||||
#驼峰下划线转换
|
||||
table-underline: true
|
||||
# 逻辑删除配置
|
||||
# 逻辑删除全局值(1表示已删除,这也是Mybatis Plus的默认配置)
|
||||
logic-delete-value: 1
|
||||
# 逻辑未删除全局值(0表示未删除,这也是Mybatis Plus的默认配置)
|
||||
logic-not-delete-value: 0
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: false
|
||||
jdbc-type-for-null: 'null'
|
||||
|
||||
#knife4j配置
|
||||
knife4j:
|
||||
#启用
|
||||
enable: true
|
||||
#基础认证
|
||||
basic:
|
||||
enable: false
|
||||
username: blade
|
||||
password: blade
|
||||
#增强配置
|
||||
setting:
|
||||
enable-swagger-models: true
|
||||
enable-document-manage: true
|
||||
enable-host: false
|
||||
enable-host-text: http://localhost
|
||||
enable-request-cache: true
|
||||
enable-filter-multipart-apis: false
|
||||
enable-filter-multipart-api-method-type: POST
|
||||
enable-footer: false
|
||||
enable-footer-custom: true
|
||||
language: zh_cn
|
||||
footer-custom-content: Copyright © 2024 BladeX All Rights Reserved
|
||||
|
||||
#swagger公共信息
|
||||
swagger:
|
||||
title: BladeX 接口文档系统
|
||||
description: BladeX 接口文档系统
|
||||
version: 4.0.1.RELEASE
|
||||
license: Powered By BladeX
|
||||
license-url: https://license.bladex.cn
|
||||
contact:
|
||||
name: 翼宿
|
||||
email: bladejava@qq.com
|
||||
url: https://gitee.com/smallc
|
||||
|
||||
#oss默认配置
|
||||
oss:
|
||||
#开启oss配置
|
||||
enabled: true
|
||||
#开启oss类型
|
||||
#minio、s3、qiniu、alioss、huaweiobs、tencentcos
|
||||
name: minio
|
||||
#租户模式
|
||||
tenant-mode: true
|
||||
#oss服务地址
|
||||
endpoint: http://127.0.0.1:9000
|
||||
#oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址
|
||||
transform-endpoint: http://localhost:9000
|
||||
#访问key
|
||||
access-key: bladexadmin
|
||||
#密钥key
|
||||
secret-key: bladexadmin
|
||||
#存储桶
|
||||
bucket-name: bladex
|
||||
|
||||
#第三方登陆配置
|
||||
social:
|
||||
oauth:
|
||||
GITHUB:
|
||||
client-id: 233************
|
||||
client-secret: 233************************************
|
||||
redirect-uri: ${social.domain}/oauth/redirect/github
|
||||
GITEE:
|
||||
client-id: 233************
|
||||
client-secret: 233************************************
|
||||
redirect-uri: ${social.domain}/oauth/redirect/gitee
|
||||
WECHAT_OPEN:
|
||||
client-id: 233************
|
||||
client-secret: 233************************************
|
||||
redirect-uri: ${social.domain}/oauth/redirect/wechat
|
||||
QQ:
|
||||
client-id: 233************
|
||||
client-secret: 233************************************
|
||||
redirect-uri: ${social.domain}/oauth/redirect/qq
|
||||
DINGTALK:
|
||||
client-id: 233************
|
||||
client-secret: 233************************************
|
||||
redirect-uri: ${social.domain}/oauth/redirect/dingtalk
|
||||
|
||||
#flowable配置
|
||||
flowable:
|
||||
activity-font-name: \u5B8B\u4F53
|
||||
label-font-name: \u5B8B\u4F53
|
||||
annotation-font-name: \u5B8B\u4F53
|
||||
check-process-definitions: false
|
||||
database-schema-update: true
|
||||
async-executor-activate: false
|
||||
async-history-executor-activate: false
|
||||
|
||||
#报表配置
|
||||
report:
|
||||
enabled: false
|
||||
database:
|
||||
provider:
|
||||
prefix: blade-
|
||||
|
||||
#job服务配置
|
||||
powerjob:
|
||||
worker:
|
||||
enabled: false
|
||||
app-name: blade-job
|
||||
port: 27777
|
||||
server-address: 127.0.0.1:7700
|
||||
|
||||
#blade配置
|
||||
blade:
|
||||
#token配置
|
||||
token:
|
||||
#是否有状态
|
||||
state: false
|
||||
#是否单用户登录
|
||||
single: false
|
||||
#单用户登录范围
|
||||
single-level: all
|
||||
#token签名 使用 @org.springblade.test.SignKeyGenerator 获取
|
||||
sign-key: 请配置32位签名
|
||||
#token加密 使用 @org.springblade.test.CryptoKeyGenerator 获取
|
||||
crypto-key: 请配置cryptoKey
|
||||
#接口配置
|
||||
api:
|
||||
#报文加密配置
|
||||
crypto:
|
||||
#启用报文加密配置
|
||||
enabled: false
|
||||
#使用 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
|
||||
aes-key: 请配置aesKey
|
||||
#使用 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
|
||||
des-key: 请配置desKey
|
||||
#jackson配置
|
||||
jackson:
|
||||
#null自动转空值
|
||||
null-to-empty: true
|
||||
#大数字自动转字符串
|
||||
big-num-to-string: true
|
||||
#支持text文本请求,与报文加密同时开启
|
||||
support-text-plain: false
|
||||
#redis序列化方式
|
||||
redis:
|
||||
serializer-type: protostuff
|
||||
#日志配置
|
||||
log:
|
||||
request:
|
||||
#开启控制台请求日志
|
||||
enabled: true
|
||||
#控制台请求日志忽略
|
||||
skip-url:
|
||||
- /blade-desk/notice/list
|
||||
- /blade-chat/weixin/**
|
||||
#开启错误日志入库
|
||||
error-log: true
|
||||
#xss配置
|
||||
xss:
|
||||
enabled: true
|
||||
skip-url:
|
||||
- /blade-chat/weixin
|
||||
- /blade-desk/notice/submit
|
||||
- /blade-flow/model/submit
|
||||
- /blade-develop/datasource/submit
|
||||
#安全框架配置
|
||||
secure:
|
||||
#接口放行
|
||||
skip-url:
|
||||
- /blade-test/**
|
||||
#授权认证配置
|
||||
auth:
|
||||
- method: ALL
|
||||
pattern: /blade-chat/weixin/**
|
||||
expression: "hasAuth()"
|
||||
- method: POST
|
||||
pattern: /blade-desk/dashboard/upload
|
||||
expression: "hasTimeAuth(9, 17)"
|
||||
- method: POST
|
||||
pattern: /blade-desk/dashboard/submit
|
||||
expression: "hasAnyRole('administrator', 'admin', 'user')"
|
||||
#基础认证配置
|
||||
basic:
|
||||
- method: ALL
|
||||
pattern: /blade-desk/dashboard/info
|
||||
username: "blade"
|
||||
password: "blade"
|
||||
#动态签名认证配置
|
||||
sign:
|
||||
- method: ALL
|
||||
pattern: /blade-desk/dashboard/sign
|
||||
crypto: "sha1"
|
||||
#多终端认证配置
|
||||
client:
|
||||
- client-id: sword
|
||||
path-patterns:
|
||||
- /blade-sword/**
|
||||
- client-id: saber
|
||||
path-patterns:
|
||||
- /blade-saber/**
|
||||
#多租户配置
|
||||
tenant:
|
||||
#多租户增强
|
||||
enhance: true
|
||||
#多租户授权保护
|
||||
license: false
|
||||
#动态数据库隔离功能
|
||||
dynamic-datasource: false
|
||||
#动态数据库隔离全局扫描
|
||||
dynamic-global: false
|
||||
#多租户字段名
|
||||
column: tenant_id
|
||||
#排除多租户逻辑
|
||||
exclude-tables:
|
||||
- blade_user
|
||||
#分库分表配置
|
||||
sharding:
|
||||
enabled: false
|
||||
Reference in New Issue
Block a user