@@ -9,22 +9,30 @@ project: tools
9
9
:asciidoc
10
10
== Reverse engineering from a database
11
11
12
- Hibernate Tools is a set of build plugins and a Java library that can be used to generate Hibernate/JPA entities starting
13
- from your relational database structure. The default behavior of the code generator is highly customizable via
14
- XML or by plugging in custom generation strategies. In addition, other artefacts such as DAO classes, HTML
15
- documentation, or even UI components can be generated by using and/or adding additional generation templates.
16
- The API can be used from custom Java classes but is also readily usable in Maven, Gradle and Ant. Other
17
- possibilities such as JBang and Quarkus are in the works.
12
+ Hibernate Tools generates entity classes from a relational database schema.
13
+ The code generator is is written in Java, and can be called directly from Java code, but it's also integrated with
14
+ Maven, Gradle, and Ant.
18
15
19
16
image::/tools/images/reveng.png[Reverse Engineering]
20
17
18
+ .feature-block
19
+ :asciidoc
20
+ == Customizable code generation
21
+
22
+ The generated code is highly customizable:
23
+
24
+ - via XML-based configuration, or
25
+ - by plugging in custom generation strategies.
26
+
27
+ In addition to entities, artefacts such as DAO classes, HTML documentation, or even UI components may be generated
28
+ via the use of custom or built-in generation templates.
29
+
21
30
.feature-block
22
31
:asciidoc
23
32
== Project configuration
24
33
25
- For the purpose of a quick introduction, let's suppose that we have a database running, for example,
26
- https://github.com/maxandersen/sakila-h2[H2 Sakila database], reachable at the following JDBC URL:
27
- `jdbc:h2:tcp://localhost/./sakila`.
34
+ Let's suppose that we have a database running, for example, the
35
+ https://github.com/maxandersen/sakila-h2[H2 Sakila database].
28
36
29
37
Let's also suppose that the following `hibernate.properties` file is available somewhere on the project class path:
30
38
@@ -79,7 +87,7 @@ project: tools
79
87
</project>
80
88
----
81
89
82
- Let's assume as well that the `src/main/resources` folder contains the `hibernate.properties` file shown earlier.
90
+ Let's also assume that the `src/main/resources` folder contains the `hibernate.properties` file shown earlier.
83
91
84
92
Having this in place, simply issuing:
85
93
[source]
0 commit comments