forked from SweetInk/jrebel-mybatisplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# jrebel-mybatisplus | ||
|
||
Jrebel mybatplus热加载插件,支持重新加载修改后的SQL映射 | ||
|
||
([English](README.md)|[中文]) | ||
|
||
# 如何使用 | ||
|
||
## 构建插件 | ||
|
||
``` shell | ||
git clone git@github.com:SweetInk/jrebel-mybatisplus.git | ||
cd jrebel-mybatisplus | ||
mvn -f jr-mybatisplus/pom.xml clean package | ||
``` | ||
|
||
将构建好的插件`jrebel-mybatisplus/targetjr-mybatisplus.jar`拷贝至任意目录, 比如: `d:\jrebel\plugin\jr-mybatisplus.jar` | ||
|
||
## 使用 | ||
|
||
打开你的IDE(Intellij IDEA or Eclipse),修改运行配置,增加VM参数:`-Drebel.plugins=d:\jrebel\plugin\jr-mybatisplus.jar`,然后以JRebel方式启动 | ||
|
||
检查插件是否生效: | ||
|
||
修改你项目中的mapper xml 文件后,重新编译,如果重新请求接口,你应该会看到控制台输出 “Reloading SQL maps” | ||
|
||
|
||
|
||
# 参考 | ||
|
||
[Custom JRebel plugins](http://manuals.zeroturnaround.com/jrebel/advanced/custom.html#jrebelcustom) | ||
|
||
[Getting Started with Javassist](http://www.javassist.org/tutorial/tutorial.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
# jrebel-mybatisplus | ||
|
||
A hook plugin for Support MybatisPlus that reloads modified SQL maps. | ||
([English]|[中文](README-zh-CN.md)) | ||
|
||
# How to use | ||
|
||
Running the web app with the custom plugin | ||
Compile the JRebel plugin like a regular maven project: `mvn -f jr-mybatisplus/pom.xml clean package`. This will produce a plugin jar in jr-mybatisplus/target/jr-mybatisplus.jar. To enable the plugin, pass the plugin’s path to JRebel using a JVM argument: `-Drebel.plugins=/path/to/jr-mybatisplus.jar`. | ||
|
||
|
||
Running from the IDE | ||
Compile the sample application and the sample plugin using mvn clean package. Configure your favourite web server with the JVM argument -Drebel.plugins=/path/to/jr-mybatisplus.jar, start it with JRebel and deploy the sample application. | ||
|
||
|
||
Running from the command line | ||
Compile the sample application and the sample plugin using `mvn clean package`. Attach the JRebel agent as usual, but also add the path to the sample plugin: | ||
|
||
Linux and Mac OS: | ||
``` | ||
export MAVEN_OPTS="<agentpath argument> -Drebel.plugins=/path/to/jr-mybatisplus.jar" | ||
mvn -f demo-application/pom.xml jetty:run | ||
``` | ||
Windows: | ||
``` | ||
set MAVEN_OPTS="<agentpath argument> -Drebel.plugins=/path/to/jr-mybatisplus.jar" | ||
mvn -f demo-application\pom.xml jetty:run | ||
``` | ||
Check that the plugin works: | ||
|
||
Modify your `Mybatis mapper` xml file. The “Reloading SQL maps” message should appear in the console at the start of the next request. | ||
|
||
|
||
# Reference | ||
|
||
[Custom JRebel plugins](http://manuals.zeroturnaround.com/jrebel/advanced/custom.html#jrebelcustom) | ||
|
||
[Getting Started with Javassist](http://www.javassist.org/tutorial/tutorial.html) |