Java code generation

Source: Internet
Author: User

1. Use powerdesigner to design the Data Structure

2. Use JavaProgramParse the PDM file of powerdesigner and convert the data structure into an xml configuration file. The xml configuration file can modify the verification method for adding fields.

3. Use freemarker to compile Java, JSP, and configuration file templates

4. Generate JavaCodeAnd put it in a temporary file;

5. manually modify the generated Java file and add special business logic code;

 

Advantages:

Spring2.0.8 and struts2.0.14 are used;

Code Generation for a single file and parent-child table code generation

The persistent layer uses springjdbc, which is easy to get started and easy to debug and modify;

 

Disadvantages:

 

The multi-to-many mode is not yet supported;

Dictionary code needs to be manually loaded;

The paging code needs to modify the paging SQL statement as the database changes;

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.