Skip to content

Commit c554b55

Browse files
committed
docs: add readme
1 parent 8d3815d commit c554b55

File tree

5 files changed

+75
-8
lines changed

5 files changed

+75
-8
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[中文](README.md) |
2+
[ENGLISH](README_EN.md)
3+
4+
## 简介
5+
6+
Mybatis-Sql-Viewer是一款增强idea对mybatis支持的插件,主要功能如下:<br/>
7+
<ul>
8+
<li>快速从代码跳转到mapper及从mapper返回代码</li>
9+
<li>mapper文件中的xml语句/方法转换成sql语句,支持参数mock、数据源配置、sql执行</li>
10+
</ul>
11+
12+
## 安装
13+
14+
`IntelliJ IDEA` > `Preferences` > `Plugins` > `Marketplace` > `Search for "mybatis sql view"` > `Install Plugin` > `Restart IntelliJ IDEA`
15+
16+
## 使用
17+
18+
![](https://linyimin-picture.oss-cn-hangzhou.aliyuncs.com/how-to-use.gif)
19+
20+
## 注意
21+
22+
由于使用了mybatis包将xml转成sql语句,会对整个项目进行编译,第一次使用时,加载会有一定耗时,请耐心等待。

README_EN.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[中文](README.md) |
2+
[ENGLISH](README_EN.md)
3+
4+
## Description
5+
6+
Mybatis-Sql-Viewer is an enhanced plugin for idea to support mybatis,here is the main functions:
7+
<ul>
8+
<li>navigate from the code to mapper and from the mapper back to code</li>
9+
<li>The xml statement/method in the mapper file convert to sql statement, which supports parameters mock, data source configuration, and sql execution</li>
10+
</ul>
11+
12+
## Install
13+
14+
`IntelliJ IDEA` > `Preferences` > `Plugins` > `Marketplace` > `Search for "mybatis sql view"` > `Install Plugin` > `Restart IntelliJ IDEA`
15+
16+
## How to Use
17+
18+
![](https://linyimin-picture.oss-cn-hangzhou.aliyuncs.com/how-to-use.gif)
19+
20+
21+
## Notice
22+
23+
Since the mybatis package is used to convert xml to sql statements, the entire project will be compiled, and the first time you use it, the loading will be take some time, so please be patient.

build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group 'org.linyimin'
7-
version '1.0-SNAPSHOT'
7+
version '1.0.0'
88

99
repositories {
1010
maven { url 'https://maven.aliyun.com/repository/public/' }
@@ -28,8 +28,14 @@ intellij {
2828
}
2929
patchPluginXml {
3030
changeNotes = """
31-
Add change notes here.<br>
32-
<em>most HTML tags may be used</em>
31+
<ul>
32+
<li>navigate from the code to mapper and from the mapper back to code</li>
33+
<li>The xml statement/method in the mapper file convert to sql statement, which supports parameters mock, data source configuration, and sql execution</li>
34+
</ul>
35+
<ul>
36+
<li>快速从代码跳转到mapper及从mapper返回代码</li>
37+
<li>mapper文件中的xml语句/方法转换成sql语句,支持参数mock、数据源配置、sql执行</li>
38+
</ul>
3339
"""
3440
}
3541

src/main/java/io/github/linyimin/plugin/service/SqlParamGenerateService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,8 @@ private Map<String, Object> getFieldFromClass(PsiClass psiClass) {
272272
param.put(fieldName, temp);
273273
}
274274
}
275-
276-
277275
}
278-
279276
return param;
280-
281277
}
282278

283279
/**

src/main/resources/META-INF/plugin.xml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,27 @@
77
<idea-version since-build="IU-201" />
88

99
<description><![CDATA[
10-
将mapper文件中的xml语句转换成sql语句,支持参数mock,sql复制,执行
10+
Mybatis-Sql-Viewer Plugin is a idea plugin for mybatis. <br />
11+
12+
<img src="https://linyimin-picture.oss-cn-hangzhou.aliyuncs.com/how-to-use.gif" />
13+
14+
<br/>
15+
16+
Mybatis-Sql-Viewer is an enhanced plugin for idea to support mybatis,here is the main functions:
17+
<ul>
18+
<li>navigate from the code to mapper and from the mapper back to code</li>
19+
<li>The xml statement/method in the mapper file convert to sql statement, which supports parameters mock, data source configuration, and sql execution</li>
20+
</ul>
21+
22+
Mybatis-Sql-Viewer是一款增强idea对mybatis支持的插件,主要功能如下:<br/>
23+
<ul>
24+
<li>快速从代码跳转到mapper及从mapper返回代码</li>
25+
<li>mapper文件中的xml语句/方法转换成sql语句,支持参数mock、数据源配置、sql执行</li>
26+
</ul>
27+
28+
<br/>
29+
<a href="https://github.com/linyimin-bupt/mybatis-sql-viewer">Github</a> Welcome to star(欢迎star)
30+
<br/>
1131
]]></description>
1232

1333
<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html

0 commit comments

Comments
 (0)