appfuse-maven-plugin(AMP)

來源:互聯網
上載者:User

標籤:

  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)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.