Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles
Articles_cn
Articles_de
Articles_pt
Articles_zh
CreateActions
CreateActions_de
CreateActions_it
CreateActions_pt
CreateActions_zh
...and 14 more




JSPWiki v2.2.33

[RSS]


Hide Menu

AppGen


Difference between version 17 and version 10:

At line 9 changed 3 lines.
# <a href="http://raibledesigns.com/wiki/Wiki.jsp?page=CreateDAO#ref-CreateDAO-5">Configure the mapping file</a> for your POJO in {{applicationContext-hibernate.xml}}. AppGen will add the PersonDao, you just need to add the mapping file to the sessionFactory bean's mappingResources property.
# cd into the ''{{extras/appgen}}'' directory and run __ant__. You will be prompted to generate from a POJO or a Table. If you choose POJO, the .java file should already exist in your {{model}} package. If you choose "table", Middlegen will be used to create a POJO from an existing database table. This generates all the files you create in the tutorials on this site (for your chosen web framework).
# To install the generated files, run __ant install__. You can run __ant install -Dmodel.name=Person__ if you want to do everything in one fell swoop. __WARNING:__ You might want to backup your project before you do this - or at least make sure it's checked into a source code repository. I've tested this code, and I think it works well - but it ''is'' modifying your source tree for you.
# If you're using Hibernate, <a href="http://raibledesigns.com/wiki/Wiki.jsp?page=CreateDAO#ref-CreateDAO-5">configure the mapping file</a> for your POJO in {{applicationContext-hibernate.xml}}. If you're using iBATIS, you can skip this step.
# cd into the ''{{extras/appgen}}'' directory and run __ant__. You will be prompted to generate from a POJO or a Table. If you choose __pojo__, the .java file should already exist in your {{model}} package. If you choose __table__, Middlegen will be used to create a POJO from an existing database table. This generates all the files you create in the tutorials on this site (for your chosen web framework).
# Finally, you will be asked to enter an application module or sub-package name. This is an optional feature that will allow you to organize your classes into sub-packages. For example, for a POJO "model" package of "org.appfuse.foo.model", just enter __foo__ when prompted.
# To install the generated files, run __ant install__. You can run __ant install -Dappgen.type=pojo -Dobject.name=person__ if you want to do everything in one fell swoop. __WARNING:__ You might want to backup your project before you do this - or at least make sure it's checked into a source code repository. I've tested this code, and I think it works well - but it ''is'' modifying your source tree for you.

Back to AppGen, or to the Page History.