In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "JPA configuration + reverse engineering mapping to Entity entity class example analysis", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "JPA configuration + reverse engineering mapping to Entity entity class example analysis" this article.
Prepare: wildfly/tomcat or other server
The Driver of your database, (mysql-connecter-java-5.1.39-bin.jar used here)
Convert existing projects to JPA project..
Step1: [select project, right click]-> [Configure]-> [Conver to JPA project]
Step2.1:Configuration has options such as custom (user customization)\ default default. Select custom and check the required option.
Step2.2: select your server from the Runtimes menu. Here I use Wildfly 10 and click [next] to proceed to the next step.
Step3: click the blue font [* Add connection*] to enter the following page:
Select your database, the MySQL I use here, and type Name,Description (to distinguish between your different links). -> [next] enter the following menu to specify the details of Driver and Connection:
Click the icon below in this option to add a new Driver
The following screen pops up, click "Name/Type" to select MySQL 5.1, and select the version according to your Driver (I use 5.1 here):
A warning is displayed
Because we do not specify the path of the corresponding JAR, continue to click "JAR List" on the right side of "Name/Type" to enter the following menu:
Click [Remove JAR/Zip] on this interface to remove the original default 5.1.0 jar package, and [Add JAR/Zip] to add your own downloaded JAR package. Then click "Properties" to the right of "JAR List" to configure the appropriate attributes:
Click on each Value and type your corresponding parameters. Click OK and the link configuration is complete. The specified Driver and link details interface will be returned, and the parameters you just configured will be displayed, as shown in the figure:
Click on the [Test Connection] test link, and the Ping succeeded window pops up: come on, we're almost there.
[OK] confirm, click [next] to proceed to the next step, a summary interface will appear. Are the parameters of your link. Click [Finish] to finish.
Return to this interface this time and click [Finish] to finish.
At this point, the project conversion JPA project has been completed, the wildfly server has been set up and linked to the database, and the last step of mapping is needed to complete: [project]-> [JPA Tools]-> [generate Entities From Tables]
The following interface pops up:
The figure shows the parameters you have just set, and select the database and table to be mapped (ps: there are three small buttons on the far right to quickly select all, deselect and reverse), and click "next" to proceed to the next step:
Show your table relationship and go straight to the next step:
These are all the contents of the article "JPA configuration + sample Analysis of reverse Engineering Mapping to Entity entity classes". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.