Skip to content

Commit

Permalink
新增eclipse审核插件使用说法
Browse files Browse the repository at this point in the history
  • Loading branch information
Gygkimo95 committed Feb 5, 2024
1 parent c3caabe commit c4a3c77
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/deploy-manual/rpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cd /opt/sqle/etc
vim config.yml
```
:::tip
确保 config.yml 的文件 owner 为 actiontech-universe:actiontech
确保 config.yaml 的文件 owner 为 actiontech-universe:actiontech
:::

## 启动 SQLE
Expand Down
59 changes: 59 additions & 0 deletions docs/dev-manual/auditplugins/eclipse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Eclipse审核插件
---

Eclipse审核插件可以在开发阶段实时进行自助式的SQL审核,确保SQL开发符合规范并满足上线要求。

## 环境要求

* 推荐使用Java8版本

* Eclipse插件最低适配Eclipse 2015 mars版本

## 使用方式

### 获取安装包
参考:https://github.com/actiontech/sqle/releases/tag/v3.2401.0

### 安装插件
将下载的jar包,复制到Eclipse编辑器目录中的dropins文件夹中
![eclipse-install](img/eclipse-install.png)

### 配置插件
1. 点击`Eclipse菜单栏`-`Window`-`Preferences`-`SQLE`
2. 在SQLE Addr栏中输入SQLE服务的地址、用户名和密码以连接到SQLE。
3. 点击`Test Connection`按钮,确保能够成功连接到SQLE并获取项目和数据库类型列表。
4. 依次选择Project、DB Type、Data Source和Schema下拉框,配置要进行审核的数据库信息。
5. 点击`Apply and Close`按钮保存配置并退出配置界面,完成配置。

![eclipse-install-edit](img/eclipse-install-edit.png)

#### 配置说明

| 配置项 | 配置项说明 |
|-----------------|--------------------------------------------------|
| SQLE Addr | SQLE 服务地址, 格式为 IP:Port |
| HTTP | 指定连接SQLE的方式是通过HTTP还是HTTPS |
| UserName | 登录SQLE使用的用户名 |
| Password | 登录SQLE使用的密码 |
| Test Connection | 测试连接是否成功, 将尝试登录SQLE |
| Project | 项目名称 |
| DB Type | 当其他配置正确时,该下拉菜单将自动获取支持审核的数据库实例类型,并使用该实例类型的审核规则进行审核 |
| Data Source | 数据源名称 |
| Schema | 数据库名称 |



### 使用说明
按照以下步骤使用插件:

1. 选中需要审核的SQL语句,可以同时选中多条。
2. 右键点击选中的SQL语句,选择[SQLE SQL Audit],插件将以视图的形式展示审核结果。
![eclipseaudit1](img/eclipseaudit1.gif)
1. 若要审核MyBatis XML文件或SQL文件,选中对应的文件,右键点击,选择[SQLE MyBatis Audit]
![eclipseauditxml](img/eclipseauditxml.gif)

:::tip
目前还支持对文件夹进行SQL审核,但仅支持审核文件夹中的XML文件。
:::

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ title: IDEA审核插件

### 切换数据源
用户可以轻松查看和更改当前的数据源,省去了繁琐的全局配置步骤,以满足多项目或多环境的场景。
![ide-install-use](img/ide-source-change.png)
![ide-install-use](img/ide-install-use.png)

### 快捷审核

Expand Down
Binary file removed docs/user-manual/img/ide-install-setting2.png
Binary file not shown.
11 changes: 9 additions & 2 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const sidebars = {
],
},
"user-manual/customrule",
"user-manual/jetbrains",
"user-manual/knowledgebase",
],
},
Expand All @@ -127,13 +126,21 @@ const sidebars = {
items: [
{
type: 'category',
label: '数据库审核插件',
label: '数据源审核插件',
items: [
"dev-manual/plugins/intro",
"dev-manual/plugins/howtouse",
"dev-manual/plugins/howtodev",
],
},
{
type: 'category',
label: '开发工具审核插件',
items: [
"dev-manual/auditplugins/jetbrains",
"dev-manual/auditplugins/eclipse",
],
},
{
type: 'category',
label: 'OpenAPI',
Expand Down

0 comments on commit c4a3c77

Please sign in to comment.