提交 650b292a 编写于 作者: O o2null

Merge branch 'fix/增加手工配置的configSample配置文件' into 'wrdp'

[平台配置]梳理config配置,增加手工配置的configSample配置文件

See merge request o2oa/o2oa!2599
...@@ -30,11 +30,12 @@ ...@@ -30,11 +30,12 @@
/o2server/configSample/person.json /o2server/configSample/person.json
/o2server/configSample/portal.json /o2server/configSample/portal.json
/o2server/configSample/processPlatform.json /o2server/configSample/processPlatform.json
/o2server/configSample/pushConfig.json /o2server/configSample/jpushConfig.json
/o2server/configSample/qiyeweixin.json /o2server/configSample/qiyeweixin.json
/o2server/configSample/query.json /o2server/configSample/query.json
/o2server/configSample/token.json /o2server/configSample/token.json
/o2server/configSample/vfs.json /o2server/configSample/vfs.json
/o2server/configSample/weLink.json
/o2server/configSample/workTime.json /o2server/configSample/workTime.json
/o2server/configSample/zhengwuDingding.json /o2server/configSample/zhengwuDingding.json
/o2server/*/src/main/webapp/describe/ /o2server/*/src/main/webapp/describe/
......
[
{
"url":"jdbc:mysql://127.0.0.1:3306/X?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8",
"username" : "root",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url" : "jdbc:db2://127.0.0.1:50000/X",
"username" : "db2admin",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url" : "jdbc:dm://127.0.0.1/X",
"username" : "admin",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url" : "jdbc:sqlserver://127.0.0.1:1433;DatabaseName=X;selectMethod=cursor;sendStringParametersAsUnicode=false",
"username" : "sa",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url" : "jdbc:kingbase://127.0.0.1:54321/X",
"username" : "system",
"password" :"krms",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url":"jdbc:mysql://127.0.0.1:3306/X?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8",
"username" : "root",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url":"jdbc:oracle:thin:@//127.0.0.1:1521/orcl",
"username" : "X",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url" : "jdbc:postgresql://localhost:5432/X",
"username" : "postgres",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
[
{
"url" : "jdbc:sqlserver://127.0.0.1:1433;DatabaseName=X;selectMethod=cursor;sendStringParametersAsUnicode=false",
"username" : "sa",
"password" :"password",
"includes": [],
"excludes": [],
"enable" : true
}
]
\ No newline at end of file
{
"file": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"processPlatform": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"mind": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"meeting": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"calendar": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"okr": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"cms": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"bbs": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"report": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"strategyDeploy": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"teamwork": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
],
"structure": [
{
"protocol": "webdav",
"username": "admin",
"password": "admin",
"host": "127.0.0.1",
"port": 8080.0,
"prefix": "",
"enable": true,
"weight": 100.0,
"name": "251",
"deepPath": false,
"###protocol": "协议,可选值ftp,webdav###",
"###username": "登录用户名.###",
"###password": "登录密码.###",
"###host": "主机地址.###",
"###port": "端口.###",
"###prefix": "前缀路径.###",
"###enable": "是否启用###",
"###weight": "设置权重.###",
"###name": "存储节点名,对应存储名称,谨慎修改.###",
"###deepPath": "是否使用更深的路径.###"
}
]
}
\ No newline at end of file
{"node_127.0.0.1.json":"节点配置",
"appStyle.json":"移动端应用样式配置",
"centerServer.json":"中心服务配置",
"clientInit.json":"客户端初始化配置",
"collect.json":"连接到云平台配置",
"communicate.json":"消息配置",
"components.json":"组件配置",
"dingding.json":"钉钉配置",
"dumpRestoreData.json":"导出导入数据配置",
"exmail.json":"腾讯企业邮邮件配置",
"externalDataSources.json":"数据库配置",
"externalDataSources_db2.json":"db2数据库配置",
"externalDataSources_dm.json":"达梦数据库配置",
"externalDataSources_informix.json":"informix数据库配置",
"externalDataSources_kingbase.json":"金仓数据库配置",
"externalDataSources_mysql.json":"mysql数据库配置",
"externalDataSources_oracle.json":"oracle数据库配置",
"externalDataSources_postgresql.json":"postgresql数据库配置",
"externalDataSources_sqlserver.json":"sqlserver数据库配置",
"externalStorageSources.json":"文件存储配置",
"jpushConfig.json":"极光推送配置",
"logLevel.json":"日志配置",
"meeting.json":"openMeeting配置",
"messages.json":"消息发送配置",
"messageSendRule.js":"消息发送规则",
"mq.json":"消息队列配置",
"person.json":"个人信息配置",
"portal.json":"门户配置",
"processPlatform.json":"流程平台配置",
"qiyeweixin.json":"企业微信配置",
"query.json":"数据中心配置",
"token.json":"令牌,密钥配置",
"vfs.json":"虚拟文件存储配置",
"web.json":"web端参数配置",
"weLink.json":"华为WeLink配置",
"workTime.json":"工作时间配置",
"zhengwuDingding.json":"政务钉钉配置"
}
/**
* 统一消息推送执行脚本,使用在messages.json配置文件
* 方法返回boolean类型,true表示满足发送条件且接受对body体的修改,false表示不发送
* 变量body表示消息体,每个消息类型的消息体可能不同,是一个Gson的JsonObject对象
* 以下excute方法表示拟稿状态的待办不发送消息;excute1方法表示变更或者添加body对象中的modifyFlag参数
*/
function excute() {
if(body.has("first") && body.has("workCreateType")){
if (body.get("first").getAsBoolean() && "surface".equals(body.get("workCreateType").getAsString())){
return false;
}
}
return true;
}
function excute1() {
body.addProperty("modifyFlag","1");
return true;
}
\ No newline at end of file
{
"enable": true,
"mq":"kafka",
"kafka":{
"bootstrap_servers": "localhost:9092",
"topic":"topic-test",
"acks": "all",
"retries": 0,
"batch_size": 16384,
"linger_ms": 1,
"buffer_memory": 33554432,
"key_deserializer": "org.apache.kafka.common.serialization.StringDeserializer",
"value_deserializer": "org.apache.kafka.common.serialization.StringDeserializer",
"###bootstrap_servers": "服务器地址###",
"###acks": "指定必须有多少个分区副本接收消息,生产者才认为消息写入成功,用户检测数据丢失的可能性###",
"###retries": "生产者从服务器收到的错误有可能是临时性的错误的次数###",
"###batch_size": "该参数指定了一个批次可以使用的内存大小,按照字节数计算(而不是消息个数)。###",
"###linger_ms": "该参数指定了生产者在发送批次之前等待更多消息加入批次的时间,增加延迟,提高吞吐量###",
"###buffer_memory": "该参数用来设置生产者内存缓冲区的大小,生产者用它缓冲要发送到服务器的消息###",
"###key_deserializer": "key值的序列化类###",
"###value_deserializer": "value的序列化类###"
},
"activeMQ":{
"url":"tcp://127.0.0.1:61616",
"queueName":"queue-test",
"###url": "服务地址,端口默认61616.###",
"###queueName": "要创建的消息名称###"
},
"###enable": "是否启用.###",
"###mq": "消息服务类型.###"
}
\ No newline at end of file
{
"mock": {},
"###mock": "使用Post模拟Put,Get模拟Delete的模块.###"
}
\ No newline at end of file
...@@ -11,37 +11,13 @@ import java.util.LinkedHashMap; ...@@ -11,37 +11,13 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.x.base.core.project.config.*;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.reflect.FieldUtils; import org.apache.commons.lang3.reflect.FieldUtils;
import org.apache.commons.lang3.reflect.MethodUtils; import org.apache.commons.lang3.reflect.MethodUtils;
import com.x.base.core.project.annotation.FieldDescribe; import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.config.AppStyle;
import com.x.base.core.project.config.Cache;
import com.x.base.core.project.config.CenterServer;
import com.x.base.core.project.config.ClientInit;
import com.x.base.core.project.config.Collect;
import com.x.base.core.project.config.Communicate;
import com.x.base.core.project.config.Components;
import com.x.base.core.project.config.ConfigObject;
import com.x.base.core.project.config.Dingding;
import com.x.base.core.project.config.DumpRestoreData;
import com.x.base.core.project.config.Exmail;
import com.x.base.core.project.config.LogLevel;
import com.x.base.core.project.config.Meeting;
import com.x.base.core.project.config.Messages;
import com.x.base.core.project.config.Node;
import com.x.base.core.project.config.Person;
import com.x.base.core.project.config.Portal;
import com.x.base.core.project.config.ProcessPlatform;
import com.x.base.core.project.config.PushConfig;
import com.x.base.core.project.config.Qiyeweixin;
import com.x.base.core.project.config.Query;
import com.x.base.core.project.config.Token;
import com.x.base.core.project.config.Vfs;
import com.x.base.core.project.config.WorkTime;
import com.x.base.core.project.config.ZhengwuDingding;
import com.x.base.core.project.gson.XGsonBuilder; import com.x.base.core.project.gson.XGsonBuilder;
import com.x.base.core.project.logger.Logger; import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory; import com.x.base.core.project.logger.LoggerFactory;
...@@ -72,11 +48,12 @@ public class CreateConfigSample { ...@@ -72,11 +48,12 @@ public class CreateConfigSample {
classes.add(Person.class); classes.add(Person.class);
classes.add(Portal.class); classes.add(Portal.class);
classes.add(ProcessPlatform.class); classes.add(ProcessPlatform.class);
classes.add(PushConfig.class); classes.add(JpushConfig.class);
classes.add(Qiyeweixin.class); classes.add(Qiyeweixin.class);
classes.add(Query.class); classes.add(Query.class);
classes.add(Token.class); classes.add(Token.class);
classes.add(Vfs.class); classes.add(Vfs.class);
classes.add(WeLink.class);
classes.add(WorkTime.class); classes.add(WorkTime.class);
classes.add(ZhengwuDingding.class); classes.add(ZhengwuDingding.class);
classes.add(Cache.class); classes.add(Cache.class);
......
...@@ -62,7 +62,7 @@ public class Config { ...@@ -62,7 +62,7 @@ public class Config {
public static final String PATH_CONFIG_PROCESSPLATFORM = "config/processPlatform.json"; public static final String PATH_CONFIG_PROCESSPLATFORM = "config/processPlatform.json";
public static final String PATH_CONFIG_QUERY = "config/query.json"; public static final String PATH_CONFIG_QUERY = "config/query.json";
public static final String PATH_CONFIG_DINGDING = "config/dingding.json"; public static final String PATH_CONFIG_DINGDING = "config/dingding.json";
public static final String PATH_CONFIG_WELINK = "config/welink.json"; public static final String PATH_CONFIG_WELINK = "config/weLink.json";
public static final String PATH_CONFIG_ZHENGWUDINGDING = "config/zhengwuDingding.json"; public static final String PATH_CONFIG_ZHENGWUDINGDING = "config/zhengwuDingding.json";
public static final String PATH_CONFIG_QIYEWEIXIN = "config/qiyeweixin.json"; public static final String PATH_CONFIG_QIYEWEIXIN = "config/qiyeweixin.json";
public static final String PATH_CONFIG_MQ = "config/mq.json"; public static final String PATH_CONFIG_MQ = "config/mq.json";
...@@ -892,15 +892,15 @@ public class Config { ...@@ -892,15 +892,15 @@ public class Config {
return instance().messageSendRuleScript; return instance().messageSendRuleScript;
} }
private PushConfig pushConfig; private JpushConfig pushConfig;
public static synchronized PushConfig pushConfig() throws Exception { public static synchronized JpushConfig pushConfig() throws Exception {
if (null == instance().pushConfig) { if (null == instance().pushConfig) {
PushConfig custom = BaseTools.readConfigObject(PATH_CONFIG_JPUSH, PushConfig.class); JpushConfig custom = BaseTools.readConfigObject(PATH_CONFIG_JPUSH, JpushConfig.class);
if (null != custom) { if (null != custom) {
instance().pushConfig = custom; instance().pushConfig = custom;
} else { } else {
instance().pushConfig = PushConfig.defaultInstance(); instance().pushConfig = JpushConfig.defaultInstance();
} }
} }
return instance().pushConfig; return instance().pushConfig;
......
...@@ -3,16 +3,16 @@ package com.x.base.core.project.config; ...@@ -3,16 +3,16 @@ package com.x.base.core.project.config;
import com.x.base.core.project.annotation.FieldDescribe; import com.x.base.core.project.annotation.FieldDescribe;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
public class PushConfig extends ConfigObject { public class JpushConfig extends ConfigObject {
private static final String O2_app_key_default = "9aca7cc20fe0cc987cd913ca"; private static final String O2_app_key_default = "9aca7cc20fe0cc987cd913ca";
private static final String O2_master_secret_default = "96ee7e2e0daffd51bac57815"; private static final String O2_master_secret_default = "96ee7e2e0daffd51bac57815";
public static PushConfig defaultInstance() { public static JpushConfig defaultInstance() {
return new PushConfig(); return new JpushConfig();
} }
public PushConfig() { public JpushConfig() {
this.enable = false; this.enable = false;
this.appKey = O2_app_key_default; this.appKey = O2_app_key_default;
this.masterSecret = O2_master_secret_default; this.masterSecret = O2_master_secret_default;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册