首页 > 移动平台 > 详细

appfuse-maven-plugin(AMP)

时间:2015-01-17 06:23:50      阅读:197      评论:0      收藏:0      [点我收藏+]
  1.  mvn appfuse:gen -Dentity=Name
     
    为POJO生成CRUD。Name的值默认是${groupId}.model.Name。
    自定义包路径:
    -Dentity=com.myproject.subpackage.model.Name
    或者
    -Dentity=~.subpackage.model.Name.
    ~代表 ${groupId}.
    如果没有指定Name值会有选择选项。该命令会自动安装,如果指定了-DdisableInstallation=true用下面的命令进行安装

  2.  mvn appfuse:install -Dentity=Name 


  3.  mvn appfuse:remove -Dentity=Name 

    移除dao的相关操作

  4.  mvn appfuse:full-source 

  5.  mvn appfuse:gen-model 

    从数据库中生成POJO对象

  注意:

  • 如果不使用给的GenericDao和GenericManager。修改pom.xml中的 <amp.genericCore>false</amp.genericCore> 
  • 外键的设置

    If you have tables with foreign key ift‘s necessary to alter the template src/test/resources/appfuse/model/Ejb3PropertyGetAnnotation.ftl

            <#lt/>${pojo.generateJoinColumnsAnnotation(property, cfg)} instead of

            <#lt/>${pojo.generateJoinColumnsAnnotation(property)}

    to generate @ManyToOne anotations 

    (It‘s necessary to do mvn appfuse:copy-templates first)

    Don‘t forget to change this to read the identifier field from the other pojo 

        <form:select ...  itemLabel="label" itemValue="value" >

    in your WEB-INF/pages/entityform.jsp

  

appfuse-maven-plugin(AMP)

原文:http://www.cnblogs.com/fengyexjtu/p/4230089.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!