wildfly h2 database (#2889)
This commit is contained in:
parent
a193fbb53f
commit
e22b382427
@ -3,7 +3,13 @@
|
|||||||
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||||
<persistence-unit name="wildfly-jpa" transaction-type="JTA">
|
<persistence-unit name="wildfly-jpa" transaction-type="JTA">
|
||||||
<jta-data-source>java:/PostgresDS</jta-data-source>
|
<jta-data-source>java:/H2DS</jta-data-source>
|
||||||
<class>model.User</class>
|
<class>model.User</class>
|
||||||
|
<properties>
|
||||||
|
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
||||||
|
<property name="hibernate.show_sql" value="true" />
|
||||||
|
<property name="hibernate.hbm2ddl.auto" value="create" />
|
||||||
|
<property name="hibernate.hbm2ddl.import_files" value="data.sql" />
|
||||||
|
</properties>
|
||||||
</persistence-unit>
|
</persistence-unit>
|
||||||
</persistence>
|
</persistence>
|
||||||
|
1
ejb/wildfly/wildfly-jpa/src/main/resources/data.sql
Normal file
1
ejb/wildfly/wildfly-jpa/src/main/resources/data.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
INSERT INTO users (username, email, postal_number) VALUES ('user1', 'user1@baeldung.com', 1000), ('user2', 'user2@baeldung.com', 2);
|
Loading…
x
Reference in New Issue
Block a user