Database-based automated generation tools automatically generate JavaBean, automatically generate database documents (v4.1.2), and javabeanv4.1.2

Source: Internet
Author: User

Database-based automated generation tools automatically generate JavaBean, automatically generate database documents (v4.1.2), and javabeanv4.1.2
Directory: 1st edition: http://blog.csdn.net/vipbooks/article/details/51912143 2nd Edition: http://blog.csdn.net/vipbooks/article/details/51912537 3rd edition: http://blog.csdn.net/vipbooks/article/details/51912750 4th edition: http://blog.csdn.net/vipbooks/article/details/51912930 5th edition: http://blog.csdn.net/vipbooks/article/details/51915364 6th edition: http://blog.csdn.net/vipbooks/article/details/51916266 7th edition: http://blog.csdn.net/vipbooks/article/details/51916507 8th edition: http://blog.csdn.net/vipbooks/article/details/52005477 9th edition: http://blog.csdn.net/vipbooks/article/details/52005926 10th edition: http://blog.csdn.net/vipbooks/article/details/52226266 11th edition: http://blog.csdn.net/vipbooks/article/details/52806475 12th edition: http://blog.csdn.net/vipbooks/article/details/53242808 v4.1.2 edition: http://blog.csdn.net/vipbooks/article/details/54234432 v4.1.2 version updates shock release, more powerful, speed to onlookers, the version update is as follows:
1. As the program becomes more and more powerful, the original positioning and design cannot meet higher requirements, so I decided to change the name of this program to TableGo, to meet the richer features and designs in the future.
2. added the ability to quickly generate database design documents and generate database design documents in batches.
3. added the ability to quickly generate JavaBean Based on fields. It is very convenient to add fields incrementally in VO.
4. Add exact match (Exclusion) and fuzzy match (Exclusion) to exclude tables that do not need to be generated.
5. Add a data source remark, which is used to automatically generate the file name of the database design document.
6. added the multi-thread timeout parameter settings. This parameter can be modified when too many table fields have timed out during document generation.
7. modified the interface layout to make the layout more reasonable.
8. Modify the object annotation so that it can automatically select the Selected Annotation.
9. Optimize the table name to "hump" and "hump" to "table name", so that it supports spaces between words, making it easier to use.
10. modify other minor bugs and optimize the code. Here is another setting technique, that is, it is best to select "no field verification" when setting the object generation policy, because I found that it is a little slow and inefficient to obtain field verification data through JDBC. In addition, by configuring the naming policies for Hibernate and MyBaits, you can set the object generation policy to "no Column Annotation on all fields", which is the fastest way to generate a JavaBean, and it is much easier to maintain code in the future. Hibernate or JPA configuration: hibernate. ejb. naming_strategy = org. hibernate. cfg. improvedNamingStrategy MySQL configuration: mapUnderscoreToCamelCase = true (after this configuration. xml does not need to write resultMap) MySQL database driver package: mysql-connector-java-5.1.39.jar Oracle Database driver package: ojdbc14.jar SQL Server using the database driver package: sqljdbc4.jar PostgreSQL database driver package: postgresql-9.4.1208.jre7.jar has always been to the database table into JavaBean and database design documents are a headache, both a waste of time and cumbersome, looking at tens of hundreds of thousands of fields in a table is really a pain. We have also thought about a lot of ways to solve this problem, including using MyEclipse to connect to the database to generate JavaBean, but there are still some unsatisfactory aspects, including the comments of tables and table fields, which are always unable to be generated, in addition, a lot of useless comments will be generated to make the Code look not clean at all, and the configuration is very cumbersome. As a result, I was so angry that I was able to write a database-Based Automated Generation Tool Using Swing. It supports MySQL, Oracle, SQLServce, and PostgreSQL, and perfectly supports JPA annotations, entity and DTO can be generated at the same time, and table prefixes can be automatically removed. Single and batch creation of JavaBean is supported. Now not only can the member variables generate comments, but also can be annotated on Getter and Setter. More importantly, you can also automatically generate database design documents. If multiple data sources can be generated in batches, It is very convenient to use. All the configurations are saved locally. Once configured, you can generate the JavaBean and database design documents in seconds for the next use. In addition, you can integrate various utility tools to make your work efficiency burst instantly, productivity burst instantly!

After the use and accumulation of some projects, I will share it with you. You can also put forward any good suggestions and ideas, because you are busy and have no time to perform comprehensive tests, so there will be some bugs. Due to the environment, MySQL, Oracle, SQL Server, and PostgreSQL tests are not complete and may cause bugs. If you find any bugs, please tell me, make corrections in the next version.

1. Configure the data source interface:

2. Configure conversion parameters:

3. On the field setting page, you can set the field conversion type based on different requirements, and add annotation configuration on the Date type:

4. Advanced Settings page:

5. The integrated tool interface integrates some practical tools to instantly increase productivity several times:

6. Skin swap function. If you choose 38 skin types, there will always be one suitable for you:

7. Data source configuration management function. You can add multiple different data sources for each type of database. To delete a data source, select the data source to be deleted. You do not need to select the data source to modify or select. You can double-click the data source to quickly select the required data source:

8. Quickly add a data source to the selected database. The remarks are used to automatically generate the database document name:

9. The parameter configuration management function allows you to configure different parameters for different projects:

10. Add a parameter configuration function quickly to add a parameter configuration for the project:

11. Open the directory function. Click the left-click menu to select the directory to open and right-click to quickly open the directory where the current application is located:

12. After selecting a supported database, the following data source, IP address, database name, port, user name, password, remarks, and database document name will automatically change accordingly, to support different data source configurations:

13. After the database is configured, click the test database connection button to test whether the database can be connected successfully and display the database version information:

14. added the ability to quickly generate database documents. Bean and database design documents can be generated at the same time. If a multi-thread processing timeout exception occurs during document generation, you can increase the multi-thread timeout time and reduce the number of tables processed by each thread to avoid timeout exceptions (to modify multi-thread parameters, restart the program ):

15. Select the template function to generate beans in different languages as needed. If you want to generate beans of other programming languages, you can send me a standard Bean of that programming language. I made it a standard template and published it:

16. view the dialog box for all tables in the database. Click More next to the exact match text box to display the dialog box for selecting a database table. All Tables in the database are listed here, you can also perform fuzzy search (Case Insensitive) to find the expected table. Select the expected table in the check box and click OK to select the expected table (double-click to select quickly ):

17. schema to be used to generate objects. schema can be automatically generated. If the schema is the same as the database user name, select dbUsername. If the schema is the same as the database name, select dbName.

18. You can generate both Entity and DTO, or you can choose to generate only some type of Bean:

19. beans with and without JPA annotations are supported:

20. Select the object annotation function. when an object is generated, an additional annotation is automatically added to the object. The @ NotBlank or @ NotNull verification annotation can be automatically added to non-empty fields:

21. Object generation policies. You can configure different object generation policies as required:

22. Object primary key generation policy. You can configure manual primary key generation or automatic primary key generation:

23. Customize the file annotation and class annotation functions, and use some internal parameters:

24. added the function of generating JavaBean Based on fields. It is very convenient to add fields incrementally in VO:

25. The batch generation database design document function is added to quickly generate database design documents in batches. If a multi-thread processing timeout exception occurs during document generation, you can increase the multi-thread timeout time and reduce the number of tables processed by each thread to avoid timeout exceptions (to modify multi-thread parameters, restart the program ):

This is a batch-generated database design document in my real big project:

26. The String concatenation tool implements second-to-second StringBuffer and is no longer afraid of long SQL statements:

27. The StringBuffer tool is the reverse tool of the String concatenation tool:

28. String formatting tools to improve work efficiency:

29. Table naming tool for transferring to camper:

30.:

31. JSON string formatting tool:

32. XML string formatting tool:

33. JSON To XML tool:

34. XML To JSON tool:

35. When the program is opened for the first time, two configuration files are automatically generated, one for configuring the database and the other for configuring parameters, if you set file comments and class comments, the configuration files for these two comments will be generated. Generally, If you configure the database for the first time and click Generate JavaBean, the Entity and DTO will be generated at the same time by default:

36. This is the automatically generated Entity and DTO:

37. This is the latest source code statistics. With the overlapping functions of several editions, tens of thousands of lines of code are available now:

 

: Http://download.csdn.net/detail/vipbooks/9732104

The package contains both 32-bit and 64-bit versions.

To use this tool, you need to install JDK 7 and later versions, because the development environment and compilation environment currently used are both JDK 7, and JDK of other versions have not been tested yet, so there should be no problems with later versions, you must configure JAVA_HOME in the environment variables of the operating system. Otherwise, Java cannot be found.

I found a lot of tools to package the Jar package into an EXE file, and I couldn't fully support 64-bit systems. Finally I found exe4j, finally, we can perfectly package the supported versions into 64-bit systems. I use the 64-bit Win10 system that comes with Alienware15R2, if the generated 32-bit program cannot be run, let's just say, I will go to the Virtual Machine for testing.

I have also published this article in ITeye. Both of these blogs are my own. The software mentioned in this article was developed by myself. If you are unable to download because of lack of product, you can download in http://vipbooks.iteye.com/blog/2351354 for free, if you think this software is good, hope you can download the version I uploaded to CSDN, only 1 point points, this is also my support. Thank you!

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.