A simple hibernate configuration xml file.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration SYSTEM
"http://www.hibernate.org/dtd/hibernate-configuration-3.3.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">
org.hibernate.dialect.Oracle10gDialect
</property>
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/myDb</property>
<property name="hibernate.connection.username">myDbUserName</property>
<property name="hibernate.connection.password">myPassword</property>
<!-- Hibernate mannping xmls -->
<mapping resource="myObject1.hbm.xml"/>
<mapping resource="myObject2.hbm.xml"/>
</session-factory>
</hibernate-configuration>
More Posts related to Java,
- CRUD operations in Spring Boot + JDBC
- Java Check Leap Year - Programs with Code Examples
- [fix] Java JDBC ConnectException: Connection refused
- How to add hours and minutes to Java Instant
- Java Program: Random Number Generator
- Java: The value of the local variable string is not used
- How to get list of all Java versions installed on macOS
- Java SE JDBC with Prepared Statement Parameterized Select Example
- Java + Spring JDBC Template + Gradle Example
- Convert String to LocalDate in Java
- Remove Trailing zeros BigDecimal Java
- Java 8 Predicate Functional Interface isEqual() Method Example
- How to Hardcode Date in Java with Examples
- Java 8: Predicate negate() default Function Example
- Java: Collect Stream as ArrayList or LinkedList
- The Motivation Behind Generics in Java Programming
- How to Add/Subtract Days to the Current Date in Java
- Error: Can not find the tag library descriptor for
- Setting up JUnit 5 dependency with Maven Example
- Run Java Code Every Second
- How to create a tar.gz file using Java
- [Fix] java: integer number too large compilation error
- Java 8: Find the Max value in a List
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console
- Convert Java Array to ArrayList Code Example
More Posts:
- Java JDK 21 - The Latest LTS Version - Java-JDK-21
- Notepad++ display files on tab bar as horizontal instead of vertical - NotepadPlusPlus
- [Solutions] Android Error in an XML file: aborting build. Eclipse SDK - Android
- How to reset an Apple Watch without an iPhone - Apple
- [fix] Spring Boot Data JPA - No identifier specified for entity - Java
- 5 Programming Languages to Learn in the Year 2021 - News
- Python Hello World! Program with code example (snippet) - Python
- How to Parse XML String in Python - Python