Compare commits
No commits in common. "7b8415ddef83583b9aeb99e4868a6d35edd20fa7" and "034974f35ef0e20f05ed36d8860732f7bd67a3b1" have entirely different histories.
7b8415ddef
...
034974f35e
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: 基本操作
|
|
||||||
description:
|
|
||||||
published: true
|
|
||||||
date: 2022-01-20T13:13:08.033Z
|
|
||||||
tags: kafka
|
|
||||||
editor: markdown
|
|
||||||
dateCreated: 2022-01-20T03:45:31.873Z
|
|
||||||
---
|
|
||||||
|
|
||||||
# 查看主题
|
|
||||||
|
|
||||||
进入 bin 目录
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-topics.sh --bootstrap-server localhost:9092 --list
|
|
||||||
```
|
|
||||||
|
|
||||||
# 删除主题
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic deleteTopic
|
|
||||||
```
|
|
100
kafka/setup.md
100
kafka/setup.md
@ -2,109 +2,13 @@
|
|||||||
title: 安装
|
title: 安装
|
||||||
description:
|
description:
|
||||||
published: true
|
published: true
|
||||||
date: 2022-01-18T13:58:48.981Z
|
date: 2022-01-18T13:27:38.792Z
|
||||||
tags: kafka
|
tags: kafka
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2022-01-18T13:27:38.792Z
|
dateCreated: 2022-01-18T13:27:38.792Z
|
||||||
---
|
---
|
||||||
|
|
||||||
# 下载Kafka
|
### 下载Kafka
|
||||||
|
|
||||||
[传送门](https://kafka.apache.org/documentation/)
|
[传送门](https://kafka.apache.org/documentation/)
|
||||||
|
|
||||||
# 修改配置
|
|
||||||
|
|
||||||
## 修改 zookeeper 配置
|
|
||||||
|
|
||||||
打开 `config/zookeeper.properties` 配置文件
|
|
||||||
|
|
||||||
修改配置
|
|
||||||
|
|
||||||
```properties
|
|
||||||
clientPort=2181
|
|
||||||
```
|
|
||||||
|
|
||||||
## 修改 kafka 配置
|
|
||||||
|
|
||||||
打开 `config/server.properties` 配置文件
|
|
||||||
|
|
||||||
取消注释并修改配置
|
|
||||||
|
|
||||||
```properties
|
|
||||||
listeners=PLAINTEXT://:9092
|
|
||||||
advertised.listeners=PLAINTEXT://host:9092
|
|
||||||
```
|
|
||||||
|
|
||||||
# 启动
|
|
||||||
|
|
||||||
进入 `bin/` 目录
|
|
||||||
|
|
||||||
## 启动 zookeeper
|
|
||||||
|
|
||||||
直接启动
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./zookeeper-server-start.sh ../config/zookeeper.properties
|
|
||||||
```
|
|
||||||
|
|
||||||
后台启动并将日志输入到指定文件
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ nohup ./zookeeper-server-start.sh ../config/zookeeper.properties > ../logs/zookeeper.log 2>&1 &
|
|
||||||
```
|
|
||||||
|
|
||||||
## 启动 kafka
|
|
||||||
|
|
||||||
直接启动
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-server-start.sh ../config/server.properties
|
|
||||||
```
|
|
||||||
|
|
||||||
后台启动并将日志输入到指定文件
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ nohup ./kafka-server-start.sh ../config/server.properties > ../logs/kafka.log 2>&1 &
|
|
||||||
```
|
|
||||||
|
|
||||||
# 测试
|
|
||||||
|
|
||||||
进入 `bin/` 目录
|
|
||||||
|
|
||||||
## 添加 topic
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic kafkatest
|
|
||||||
```
|
|
||||||
|
|
||||||
## 启动 producer
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-console-producer.sh --broker-list localhost:9092 --topic kafkatest
|
|
||||||
```
|
|
||||||
|
|
||||||
## 启动 consumer
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic kafkatest --from-beginning
|
|
||||||
```
|
|
||||||
|
|
||||||
## 测试消息
|
|
||||||
|
|
||||||
在 producer 中输入内容并回车,查看 consumer 输出内容是否相同
|
|
||||||
|
|
||||||
# 停止
|
|
||||||
|
|
||||||
进入 `bin/` 目录
|
|
||||||
|
|
||||||
## 停止 kafka
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./kafka-server-stop.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## 停止 zookeeper
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./zookeeper-server-stop.sh
|
|
||||||
```
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
title: 6.流程引擎
|
title: 6.流程引擎
|
||||||
description: activiti流程引擎模块的使用
|
description: activiti流程引擎模块的使用
|
||||||
published: true
|
published: true
|
||||||
date: 2022-04-23T07:04:27.737Z
|
date: 2021-12-07T14:35:09.847Z
|
||||||
tags: wg-basic, activiti
|
tags: wg-basic, activiti
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2021-09-01T09:28:31.684Z
|
dateCreated: 2021-09-01T09:28:31.684Z
|
||||||
@ -14,15 +14,6 @@ dateCreated: 2021-09-01T09:28:31.684Z
|
|||||||
|
|
||||||
该模块需要手动添加管理菜案
|
该模块需要手动添加管理菜案
|
||||||
|
|
||||||
> 绘制 OA 流程时,动态表单需要先设计,并且表单类型为 **OA**。
|
|
||||||
> 非 OA 流程正常绘制流程图即可。
|
|
||||||
{.is-info}
|
|
||||||
|
|
||||||
|
|
||||||
# 更新
|
|
||||||
|
|
||||||
- 20220423:增加了OA流程管理,结合动态表单与流程绘制中的OA节点管理可完成无代码OA表单流转。
|
|
||||||
|
|
||||||
# 依赖
|
# 依赖
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -65,26 +56,14 @@ spring:
|
|||||||
`@SpringBootApplication` 注解增加 `exclude=SecurityAutoConfiguration.class`
|
`@SpringBootApplication` 注解增加 `exclude=SecurityAutoConfiguration.class`
|
||||||
|
|
||||||
```
|
```
|
||||||
import org.activiti.spring.boot.SecurityAutoConfiguration;
|
|
||||||
|
|
||||||
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
|
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
|
||||||
```
|
```
|
||||||
|
|
||||||
# 添加菜单
|
# 添加菜单
|
||||||
|
|
||||||
**流程菜单**
|
|
||||||
流程模型:`/route/activiti/list`
|
流程模型:`/route/activiti/list`
|
||||||
流程定义:`/route/activiti/procdef/list`
|
流程定义:`/route/activiti/procdef/list`
|
||||||
|
|
||||||
**OA菜单**
|
|
||||||
发起流程:`/route/oa/list-procdef`
|
|
||||||
我的待办:`/route/oa/list-task-of-mine`
|
|
||||||
我的已办:`/route/oa/list-history-task-of-mine`
|
|
||||||
|
|
||||||
**表单菜单**
|
|
||||||
表单管理:`/route/form/list`
|
|
||||||
|
|
||||||
|
|
||||||
# 如何启动流程
|
# 如何启动流程
|
||||||
|
|
||||||
1. 在流程管理菜单下将流程绘制好并部署后,会生成 **部署ID(deploymentId)**
|
1. 在流程管理菜单下将流程绘制好并部署后,会生成 **部署ID(deploymentId)**
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
title: 页面组件
|
title: 页面组件
|
||||||
description: 页面上使用的组件
|
description: 页面上使用的组件
|
||||||
published: true
|
published: true
|
||||||
date: 2022-02-11T03:04:00.153Z
|
date: 2022-01-17T04:25:26.729Z
|
||||||
tags: wg-basic
|
tags: wg-basic
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2021-09-08T06:41:19.351Z
|
dateCreated: 2021-09-08T06:41:19.351Z
|
||||||
---
|
---
|
||||||
|
|
||||||
# 表单下拉列表
|
# 1. 表单下拉列表
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -23,7 +23,7 @@ dateCreated: 2021-09-08T06:41:19.351Z
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
# 表单下拉联动
|
# 2. 表单下拉联动
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -120,7 +120,7 @@ form.on('select(area1)', function(data) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
# 表单单选
|
# 3. 表单单选
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div class="layui-form-item" pane>
|
<div class="layui-form-item" pane>
|
||||||
@ -132,7 +132,7 @@ form.on('select(area1)', function(data) {
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
# 表单多选
|
# 4. 表单多选
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div class="layui-form-item" pane>
|
<div class="layui-form-item" pane>
|
||||||
@ -166,7 +166,7 @@ for(var i = 0, item = authorizedGrantTypes[i]; item = authorizedGrantTypes[i++];
|
|||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
```
|
```
|
||||||
|
|
||||||
# 表单下拉、单选、复选统一处理
|
# 5. 表单下拉、单选、复选统一处理
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// 初始化选择框、单选、复选模板
|
// 初始化选择框、单选、复选模板
|
||||||
@ -181,7 +181,7 @@ function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callba
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
# viewer,具体是用参考官方API
|
# 6. viewer,具体是用参考官方API
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
@ -191,7 +191,7 @@ new Viewer(document.getElementById('boxId'), {navbar: true});
|
|||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
# 列表按钮
|
# 7. 列表按钮
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// 单按钮
|
// 单按钮
|
||||||
@ -222,13 +222,13 @@ table.on('tool(dataTable)', function(obj) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
# 选择人员(表格)
|
# 8. 选择人员(表格)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# 文件上传(图片示例)
|
# 9. 文件上传(图片示例)
|
||||||
|
|
||||||
依赖
|
依赖
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ function initHealthCodeUploadFile() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
# 选择用户
|
# 10. 选择用户
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
top.dialog.dialogData.selectedUserIds = $('#selectedUserIds').val();
|
top.dialog.dialogData.selectedUserIds = $('#selectedUserIds').val();
|
||||||
@ -444,7 +444,7 @@ top.dialog.open({
|
|||||||
1. `top.dialog.dialogData.selectedUserIds` 的值为 **下划线** 分割的ID
|
1. `top.dialog.dialogData.selectedUserIds` 的值为 **下划线** 分割的ID
|
||||||
2. 返回的列表中可以获取:userId,userName
|
2. 返回的列表中可以获取:userId,userName
|
||||||
|
|
||||||
# 选择地区
|
# 11. 选择地区
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -485,68 +485,7 @@ top.dialog.open({
|
|||||||
1. 打开页面时的参数 **areaName** 用于回显,可以不传。
|
1. 打开页面时的参数 **areaName** 用于回显,可以不传。
|
||||||
2. 返回的列表中可以获取:areaId,areaName,areaCode
|
2. 返回的列表中可以获取:areaId,areaName,areaCode
|
||||||
|
|
||||||
# 选择地区(带按钮)
|
# 12.列表下拉选择
|
||||||
|
|
||||||
样式可根据实际情况调整
|
|
||||||
|
|
||||||
```html
|
|
||||||
<style>
|
|
||||||
.table-select-area {position: relative; width: 200px;}
|
|
||||||
.table-select-area #areaName {width: 64%}
|
|
||||||
.table-select-area .select-btn {position: absolute; top: 0px; right: 0px; width: 36%; border-color: #e6e6e6;}
|
|
||||||
</style>
|
|
||||||
```
|
|
||||||
|
|
||||||
```html
|
|
||||||
<div class="layui-inline table-select-area">
|
|
||||||
<input type="hidden" id="areaCode">
|
|
||||||
<input type="text" id="areaName" class="layui-input search-item search-item-width-300" placeholder="选择地区" readonly>
|
|
||||||
<div class="layui-btn-group select-btn">
|
|
||||||
<button type="button" id="areaSelectBtn" class="layui-btn layui-btn-sm layui-btn-primary" title="选择区域">
|
|
||||||
<i class="fa fa-circle-thin"></i>
|
|
||||||
</button>
|
|
||||||
<button type="button" id="areaCleanBtn" class="layui-btn layui-btn-sm layui-btn-primary" title="删除区域">
|
|
||||||
<i class="fa fa-times-circle"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
(function() {
|
|
||||||
$(document).on('click', '#areaSelectBtn', function() {
|
|
||||||
top.dialog.open({
|
|
||||||
title: '选择地区',
|
|
||||||
url: top.restAjax.path('route/area/get-select', []),
|
|
||||||
width: '600px',
|
|
||||||
height: '225px',
|
|
||||||
onClose: function() {
|
|
||||||
var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;
|
|
||||||
var areaCode = '';
|
|
||||||
var areaName = '';
|
|
||||||
if(selectedAreaArray.length > 0) {
|
|
||||||
areaCode = selectedAreaArray[selectedAreaArray.length - 1].areaCode;
|
|
||||||
for(var i = 0, item; item = selectedAreaArray[i++];) {
|
|
||||||
if(areaName) {
|
|
||||||
areaName += ',';
|
|
||||||
}
|
|
||||||
areaName += item.areaName;
|
|
||||||
}
|
|
||||||
$('#areaCode').val(areaCode);
|
|
||||||
$('#areaName').val(areaName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
$(document).on('click', '#areaCleanBtn', function () {
|
|
||||||
$('#areaCode').val('');
|
|
||||||
$('#areaName').val('');
|
|
||||||
})
|
|
||||||
})()
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
# 列表下拉选择
|
|
||||||
|
|
||||||
位置:`<div class="test-table-reload-btn"></div>` 里
|
位置:`<div class="test-table-reload-btn"></div>` 里
|
||||||
|
|
||||||
@ -605,14 +544,14 @@ form.on('select(typeFilter)', function(data) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
# url中query参数集合对象
|
# 13.url中query参数集合对象
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var params = top.restAjax.params(window.location.href);
|
var params = top.restAjax.params(window.location.href);
|
||||||
var xxx = params.xxx;
|
var xxx = params.xxx;
|
||||||
```
|
```
|
||||||
|
|
||||||
# 列表选择
|
# 14.列表选择
|
||||||
|
|
||||||
> 这里只是示例,具体的参数、变量需根据实际情况修改
|
> 这里只是示例,具体的参数、变量需根据实际情况修改
|
||||||
{.is-warning}
|
{.is-warning}
|
||||||
|
Loading…
Reference in New Issue
Block a user