November 2018
Intermediate to advanced
388 pages
9h 5m
English
In order to bootstrap the JPA process in a server environment, we don't have to do much. We just have to configure one XML file, which is the persistence.xml file under resources/META-INF. We define one persistence unit for a database. We can then define the JPA entities. An example of persistence.xml is shown here:
<?xml version="1.0" encoding="UTF-8"?><persistence version="2.1" 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"> <persistence-unit name="prod"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <class>org.rao.kotlin.entity.Person ...
Read now
Unlock full access