W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎勵
下載擴(kuò)展工具源碼(YMP框架Maven擴(kuò)展工具項(xiàng)目地址)
執(zhí)行命令:git clone https://git.oschina.net/suninformation/ymate-maven-extension.git
編譯并安裝到本地Maven倉庫
執(zhí)行命令: cd ymate-maven-extension
mvn clean install
ymate-maven-plugin
插件 <plugin>
<groupId>net.ymate.maven.plugins</groupId>
<artifactId>ymate-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
在工程根路徑下執(zhí)行命令:
mvn ymate:entity
輸出內(nèi)容:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[INFO] Scanning for projects...
[INFO] ......(此處省略若干字)
[INFO] --- ymate-maven-plugin:1.0-SNAPSHOT:entity (default-cli) @ ymp-examples-webapp ---
三月 25, 2016 12:25:07 上午 net.ymate.platform.core.YMP init
信息:
__ ____ __ ____ ____
\ \ / / \/ | _ \ __ _|___ \
\ V /| |\/| | |_) | \ \ / / __) |
| | | | | | __/ \ V / / __/
|_| |_| |_|_| \_/ |_____| Website: http://www.ymate.net/
三月 25, 2016 12:25:07 上午 net.ymate.platform.core.YMP init
信息: Initializing ymate-platform-core-2.0.0-GA build-20160324-2339 - debug:true
......(此處省略若干字)
信息: [show tables][][1][13ms]
Output file "/Users/suninformation/IdeaProjects/ymate-platform-examples/ymp-examples-webapp/src/main/java/net/ymate/platform/examples/model/User.java".
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.577s
[INFO] Finished at: Fri Mar 25 00:25:08 CST 2016
[INFO] Final Memory: 10M/163M
[INFO] ------------------------------------------------------------------------
通過插件生成的代碼默認(rèn)放置在src/main/java
路徑,當(dāng)數(shù)據(jù)庫表發(fā)生變化時(shí),直接執(zhí)行插件命令就可以快速更新數(shù)據(jù)實(shí)體對象,是不是很更方便呢,大家可以動手嘗試一下!:p
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: