zoukankan      html  css  js  c++  java
  • appfuse-maven-plugin(AMP)

    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

      

  • 相关阅读:
    函数名的使用-闭包-迭代器
    函数
    文件操作
    基础数据补充
    python基础-数据类型(2)
    python基础-数据类型(1)
    PHP 缓存技术(一)
    linux学习笔记整理(九)
    linux学习笔记整理(八)
    linux学习笔记整理(七)
  • 原文地址:https://www.cnblogs.com/fengyexjtu/p/4230089.html
Copyright © 2011-2022 走看看