Microservice: Create JPA App Using Jakarta Persistence API in Payara Micro
Before We Begin: In this tutorial, we will configure this application with the following components in mind: The microservice application will be a Mavenized Java application. We will use MySQL DB Server as a relational database. The JDBC data source will be a transactional data source ( XADataSource ). JDBC Driver Library Configuration With Maven You need a JDBC driver to connect your Java application with a relational database. The driver is usually provided by the database vendor. Fortunately, most database vendors have released their JDBC drivers to a Maven repository. If you use Maven to build your application, you can add your JDBC driver by adding code that is similar to the following example to your pom.xml file. XML 1 < dependencyManagement > 2 < dependencies > 3 <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> 4 < dependency > 5 < groupId > mysql </ groupId > 6
Comments
Post a Comment