第十四章 常见问题(Q&A)
jabdp-v2.0.0之前的版本都是能互相兼容的,2.0及之后的版本是无法与之前的版本兼容(PS:不兼容的原因:技术框架的不同而导致的无法兼容)。
如何将旧版平台增量更新成新版平台?具体步骤如下:
1、首先需要先下载最新版本的平台。
2、下载完成后,解压缩最新版本的压缩包。
3、进入iDesigner目录,找到jabdp.zip(该文件就是新版本的升级包),如下图:
4、将jabdp.zip解压缩到当前目录,如下图 :
5、进入解压出来的文件夹中,目录结构如下:
6、先进入index文件夹中,删除config.json文件。
7、再来到WEB-INF/clasess目录下,删除如下两个文件:
8、jabdp升级包处理完之后,来到自己应用所在的目录下,删除如下所示的文件夹:
P.S.: 1.4.5升级到1.4.6时,需要删除vdata文件夹,并在数据库中执行如下SQL(请根据自己的数据库选择对应SQL语句执行):
MYSQL
-- ----------------------------
-- Table structure for sys_visual_component
-- ----------------------------
DROP TABLE IF EXISTS `sys_visual_component`;
CREATE TABLE `sys_visual_component` (
`id` bigint(64) auto_increment NOT NULL COMMENT '主键',
`name` varchar(50) DEFAULT NULL COMMENT '组件名称',
`content` longtext COMMENT '组件内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='可视化组件表';
-- ----------------------------
-- Records of sys_visual_component
-- ----------------------------
BEGIN;
INSERT INTO `sys_visual_component` VALUES (1, '搜索组件', '<template>\n <el-form :inline=\"true\" :model=\"form\">\n <el-form-item label=\"审批人\">\n <el-input v-model=\"form.user\" placeholder=\"请输入审批人\"></el-input>\n </el-form-item>\n <el-form-item label=\"活动区域\">\n <el-select v-model=\"form.region\" placeholder=\"请输入活动区域\">\n <el-option label=\"区域一\" value=\"shanghai\"></el-option>\n <el-option label=\"区域二\" value=\"beijing\"></el-option>\n </el-select>\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">查询</el-button>\n </el-form-item>\n </el-form>\n</template>\n<script>\n export default {\n data() {\n return {\n form: {\n user: \'\',\n region: \'\'\n }\n }\n },\n methods: {\n onSubmit() {\n this.$emit(\'click\',this.form)\n }\n }\n }\n</script>');
INSERT INTO `sys_visual_component` VALUES (2, 'layer弹窗组件', '<template>\n <div class=\"test\">\n <el-button type=\"success\" @click=\"handleClick\">点击我弹窗</el-button>\n </div>\n</template>\n<script>\nexport default{\n data(){\n return{\n \n }\n },\n created(){\n \n },\n methods:{\n handleClick(){\n window.$loadScript(\'js\',\'https://cdn.staticfile.org/jquery/2.1.2/jquery.js\').then(()=>{\n return window.$loadScript(\'js\',\'https://data.avuejs.com/layer/layer.js\')\n }).then(()=>{\n return window.$loadScript(\'js\',\'https://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js\')\n }).then(()=>{\n layer.open({\n title: \'生成二维码\',\n content: \'<div id=\"qrcode\"></div>\',\n success: function(layero, index){\n var config={\n width:200,\n height:200,\n text:\"苦逼的程序员\"\n }\n $(\"#qrcode\").qrcode(config);\n }\n });\n \n })\n }\n }\n}\n</script>\n<style>\n .test{\n text-align:center;\n color:red;\n font-size:40px;\n }\n</style>');
INSERT INTO `sys_visual_component` VALUES (3, 'table表格', '<template>\n <el-table\n :data=\"tableData\"\n style=\"width: 100%\">\n <el-table-column\n prop=\"date\"\n label=\"日期\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"name\"\n label=\"姓名\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"address\"\n label=\"地址\">\n </el-table-column>\n </el-table>\n </template>\n\n <script>\n export default {\n data() {\n return {\n tableData: [{\n date: \'2016-05-02\',\n name: \'王小虎\',\n address: \'上海市普陀区金沙江路 1518 弄\'\n }, {\n date: \'2016-05-04\',\n name: \'王小虎\',\n address: \'上海市普陀区金沙江路 1517 弄\'\n }, {\n date: \'2016-05-01\',\n name: \'王小虎\',\n address: \'上海市普陀区金沙江路 1519 弄\'\n }, {\n date: \'2016-05-03\',\n name: \'王小虎\',\n address: \'上海市普陀区金沙江路 1516 弄\'\n }]\n }\n }\n }\n </script>');
COMMIT;
-- ----------------------------
-- Table structure for sys_visual_db
-- ----------------------------
DROP TABLE IF EXISTS `sys_visual_db`;
CREATE TABLE `sys_visual_db` (
`id` bigint(64) auto_increment NOT NULL COMMENT '主键',
`name` varchar(100) DEFAULT NULL COMMENT '名称',
`driver_class` varchar(100) DEFAULT NULL COMMENT '驱动类',
`url` varchar(500) DEFAULT NULL COMMENT '连接地址',
`username` varchar(50) DEFAULT NULL COMMENT '用户名',
`password` varchar(50) DEFAULT NULL COMMENT '密码',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`create_user` bigint(64) DEFAULT NULL COMMENT '创建人',
`create_dept` bigint(64) DEFAULT NULL COMMENT '创建部门',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_user` bigint(64) DEFAULT NULL COMMENT '修改人',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`status` int(2) DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) DEFAULT NULL COMMENT '是否已删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='可视化数据源配置表';
-- ----------------------------
-- Records of sys_visual_db
-- ----------------------------
BEGIN;
INSERT INTO `sys_visual_db` VALUES (1, 'mysql-jabdp', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3366/oa?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'YAmAbmkeNTLRjW5W', 'mysql', 1, 1, '2022-10-09 10:20:06', 1, '2022-10-09 10:24:59', 1, 0);
COMMIT;
SQL SERVER
-- ----------------------------
-- Table structure for sys_visual_component
-- ----------------------------
CREATE TABLE sys_visual_component (
id NUMERIC(38) IDENTITY NOT NULL , -- , -- COMMENT '主键',
name nvarchar(50) DEFAULT NULL , -- , -- COMMENT '组件名称',
content nvarchar(max) , -- , -- COMMENT '组件内容',
PRIMARY KEY (id)
) ; -- , -- COMMENT='可视化组件表';
-- ----------------------------
-- Records of sys_visual_component
-- ----------------------------
SET IDENTITY_INSERT sys_visual_component ON
INSERT INTO sys_visual_component(id, name, content) VALUES (1, '搜索组件', '<template>\n <el-form :inline=\"true\" :model=\"form\">\n <el-form-item label=\"审批人\">\n <el-input v-model=\"form.user\" placeholder=\"请输入审批人\"></el-input>\n </el-form-item>\n <el-form-item label=\"活动区域\">\n <el-select v-model=\"form.region\" placeholder=\"请输入活动区域\">\n <el-option label=\"区域一\" value=\"shanghai\"></el-option>\n <el-option label=\"区域二\" value=\"beijing\"></el-option>\n </el-select>\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">查询</el-button>\n </el-form-item>\n </el-form>\n</template>\n<script>\n export default {\n data() {\n return {\n form: {\n user: \"\",\n region: \"\"\n }\n }\n },\n methods: {\n onSubmit() {\n this.$emit(\"click\",this.form)\n }\n }\n }\n</script>');
INSERT INTO sys_visual_component(id, name, content) VALUES (2, 'layer弹窗组件', '<template>\n <div class=\"test\">\n <el-button type=\"success\" @click=\"handleClick\">点击我弹窗</el-button>\n </div>\n</template>\n<script>\nexport default{\n data(){\n return{\n \n }\n },\n created(){\n \n },\n methods:{\n handleClick(){\n window.$loadScript(\"js\",\"https://cdn.staticfile.org/jquery/2.1.2/jquery.js\").then(()=>{\n return window.$loadScript(\"js\",\"https://data.avuejs.com/layer/layer.js\")\n }).then(()=>{\n return window.$loadScript(\"js\",\"https://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js\")\n }).then(()=>{\n layer.open({\n title: \"生成二维码\",\n content: \"<div id=\"qrcode\"></div>\",\n success: function(layero, index){\n var config={\n width:200,\n height:200,\n text:\"苦逼的程序员\"\n }\n $(\"#qrcode\").qrcode(config);\n }\n });\n \n })\n }\n }\n}\n</script>\n<style>\n .test{\n text-align:center;\n color:red;\n font-size:40px;\n }\n</style>');
INSERT INTO sys_visual_component(id, name, content) VALUES (3, 'table表格', '<template>\n <el-table\n :data=\"tableData\"\n style=\"width: 100%\">\n <el-table-column\n prop=\"date\"\n label=\"日期\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"name\"\n label=\"姓名\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"address\"\n label=\"地址\">\n </el-table-column>\n </el-table>\n </template>\n\n <script>\n export default {\n data() {\n return {\n tableData: [{\n date: \"2016-05-02\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1518 弄\"\n }, {\n date: \"2016-05-04\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1517 弄\"\n }, {\n date: \"2016-05-01\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1519 弄\"\n }, {\n date: \"2016-05-03\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1516 弄\"\n }]\n }\n }\n }\n </script>');
SET IDENTITY_INSERT sys_visual_component off
-- ----------------------------
-- Table structure for sys_visual_db
-- ----------------------------
CREATE TABLE sys_visual_db (
id NUMERIC(38) IDENTITY NOT NULL , -- COMMENT '主键',
name nvarchar(100) DEFAULT NULL , -- COMMENT '名称',
driver_class nvarchar(100) DEFAULT NULL , -- COMMENT '驱动类',
url nvarchar(500) DEFAULT NULL , -- COMMENT '连接地址',
username nvarchar(50) DEFAULT NULL , -- COMMENT '用户名',
password nvarchar(50) DEFAULT NULL , -- COMMENT '密码',
remark nvarchar(255) DEFAULT NULL , -- COMMENT '备注',
create_user NUMERIC(38) DEFAULT NULL , -- COMMENT '创建人',
create_dept NUMERIC(38) DEFAULT NULL , -- COMMENT '创建部门',
create_time datetime DEFAULT NULL , -- COMMENT '创建时间',
update_user NUMERIC(38) DEFAULT NULL , -- COMMENT '修改人',
update_time datetime DEFAULT NULL , -- COMMENT '修改时间',
status int DEFAULT NULL , -- COMMENT '状态',
is_deleted int DEFAULT NULL , -- COMMENT '是否已删除',
PRIMARY KEY (id)
) ; -- COMMENT='可视化数据源配置表';
-- ----------------------------
-- Records of sys_visual_db
-- ----------------------------
SET IDENTITY_INSERT sys_visual_db on
INSERT INTO sys_visual_db(id, name, driver_class, url, username, password, remark, create_user, create_dept, create_time, update_user, update_time, status, is_deleted) VALUES (1, 'mysql-jabdp', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3366/oa?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'YAmAbmkeNTLRjW5W', 'mysql', 1, 1, '2022-10-09 10:20:06', 1, '2022-10-09 10:24:59', 1, 0);
SET IDENTITY_INSERT sys_visual_db off
达梦数据库
-- ----------------------------
-- Table structure for sys_visual_component
-- ----------------------------
DROP TABLE IF EXISTS sys_visual_component;
CREATE TABLE sys_visual_component (
id bigint NOT NULL COMMENT '主键',
name varchar(50) DEFAULT NULL COMMENT '组件名称',
content text COMMENT '组件内容',
PRIMARY KEY (id)
) -- COMMENT='可视化组件表';
-- ----------------------------
-- Records of sys_visual_component
-- ----------------------------
;
INSERT INTO sys_visual_component VALUES (1, '搜索组件', '<template>\n <el-form :inline=\"true\" :model=\"form\">\n <el-form-item label=\"审批人\">\n <el-input v-model=\"form.user\" placeholder=\"请输入审批人\"></el-input>\n </el-form-item>\n <el-form-item label=\"活动区域\">\n <el-select v-model=\"form.region\" placeholder=\"请输入活动区域\">\n <el-option label=\"区域一\" value=\"shanghai\"></el-option>\n <el-option label=\"区域二\" value=\"beijing\"></el-option>\n </el-select>\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">查询</el-button>\n </el-form-item>\n </el-form>\n</template>\n<script>\n export default {\n data() {\n return {\n form: {\n user: \"\",\n region: \"\"\n }\n }\n },\n methods: {\n onSubmit() {\n this.$emit(\"click\",this.form)\n }\n }\n }\n</script>');
INSERT INTO sys_visual_component VALUES (2, 'layer弹窗组件', '<template>\n <div class=\"test\">\n <el-button type=\"success\" @click=\"handleClick\">点击我弹窗</el-button>\n </div>\n</template>\n<script>\nexport default{\n data(){\n return{\n \n }\n },\n created(){\n \n },\n methods:{\n handleClick(){\n window.$loadScript(\"js\",\"https://cdn.staticfile.org/jquery/2.1.2/jquery.js\").then(()=>{\n return window.$loadScript(\"js\",\"https://data.avuejs.com/layer/layer.js\")\n }).then(()=>{\n return window.$loadScript(\"js\",\"https://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js\")\n }).then(()=>{\n layer.open({\n title: \"生成二维码\",\n content: \"<div id=\"qrcode\"></div>\",\n success: function(layero, index){\n var config={\n width:200,\n height:200,\n text:\"苦逼的程序员\"\n }\n $(\"#qrcode\").qrcode(config);\n }\n });\n \n })\n }\n }\n}\n</script>\n<style>\n .test{\n text-align:center;\n color:red;\n font-size:40px;\n }\n</style>');
INSERT INTO sys_visual_component VALUES (3, 'table表格', '<template>\n <el-table\n :data=\"tableData\"\n style=\"width: 100%\">\n <el-table-column\n prop=\"date\"\n label=\"日期\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"name\"\n label=\"姓名\"\n width=\"180\">\n </el-table-column>\n <el-table-column\n prop=\"address\"\n label=\"地址\">\n </el-table-column>\n </el-table>\n </template>\n\n <script>\n export default {\n data() {\n return {\n tableData: [{\n date: \"2016-05-02\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1518 弄\"\n }, {\n date: \"2016-05-04\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1517 弄\"\n }, {\n date: \"2016-05-01\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1519 弄\"\n }, {\n date: \"2016-05-03\",\n name: \"王小虎\",\n address: \"上海市普陀区金沙江路 1516 弄\"\n }]\n }\n }\n }\n </script>');
COMMIT;
-- ----------------------------
-- Table structure for sys_visual_db
-- ----------------------------
DROP TABLE IF EXISTS sys_visual_db;
CREATE TABLE sys_visual_db (
id bigint NOT NULL COMMENT '主键',
name varchar(100) DEFAULT NULL COMMENT '名称',
driver_class varchar(100) DEFAULT NULL COMMENT '驱动类',
url varchar(500) DEFAULT NULL COMMENT '连接地址',
username varchar(50) DEFAULT NULL COMMENT '用户名',
password varchar(50) DEFAULT NULL COMMENT '密码',
remark varchar(255) DEFAULT NULL COMMENT '备注',
create_user bigint DEFAULT NULL COMMENT '创建人',
create_dept bigint DEFAULT NULL COMMENT '创建部门',
create_time datetime DEFAULT NULL COMMENT '创建时间',
update_user bigint DEFAULT NULL COMMENT '修改人',
update_time datetime DEFAULT NULL COMMENT '修改时间',
status int DEFAULT NULL COMMENT '状态',
is_deleted int DEFAULT NULL COMMENT '是否已删除',
PRIMARY KEY (id) --USING BTREE (id)
) -- COMMENT='可视化数据源配置表';
-- ----------------------------
-- Records of sys_visual_db
-- ----------------------------
;
CREATE INDEX INX_SVD_ID ON sys_visual_db(id);
INSERT INTO sys_visual_db VALUES (1, 'mysql-jabdp', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3366/oa?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'YAmAbmkeNTLRjW5W', 'mysql', 1, 1, '2022-10-09 10:20:06', 1, '2022-10-09 10:24:59', 1, 0);
COMMIT;
9、然后按如下图所示进行操作:
10、至此,增量升级完毕!(PS:不要忘记重启平台!)
答:
错误原因
流程使用了flowable工作流引擎,flowable自带的方法生成图片时,如果设置字体为宋体,在windows上使用是没有问题的,因为windows系统自带宋体的字体库。但是如果发布到Linux,则会出现乱码问题,因为大部分Linux并不包含宋体字体库
解决办法
知道了错误原因,就可以动手解决问题了。缺少宋体字体库,那么就给Linux安装一下宋体字体库就完事了。
如何查看Linux已经安装的字体库?
# 安装fontconfig
yum install fontconfig -y
# 查看所有字体
fc-list
# 查看宋体
fc-list | grep "宋体"
Linux如何添加宋体字体库?
1、在 WindowsC:\Windows\WinSxS
目录下找到你需要的字体(PS:以amd64_microsoft-windows-font-truetype
前缀的字体):
2、新建一个文件夹 windowsFonts,将需要的字体放入。(PS: 只是缺少宋体的话,我们只需要放入simsun.ttc这个字体文件)
3、将windowsFonts文件夹上传到服务器目录/usr/share/fonts
下
4、最后在此路径执行:fc-cache -fv
命令