Simple Java application that demonstrates the use of Hibernate for ORM (Object-Relational Mapping) to interact with a MySQL database. The application includes a graphical user interface (GUI) built using JavaFX.
- Integrates with a MySQL database using Hibernate
- Supports basic database operations such as adding, updating, and deleting users
- Provides a user-friendly interface for interacting with the database
Before running the application, ensure you have the following:
- An empty MySQL database set up, which Hibernate will use to create the necessary tables
- JDBC driver and Hibernate library configured in your project
-
Clone the Repository:
git clone https://github.com/petarmilunovic/hibernate-demo.git cd hibernate-demo
-
Add dependencies:
- The repository already contains a pom.xml file with all necessary dependencies, including Hibernate and JavaFX
- If you're not using Maven, download the required libraries JDBC, Hibernate and add JAR files to your project's classpath
- Configure Database Connection:
- Create an empty MySQL database
- Update the hibernate.cfg.xml file in the resources folder with your database connection details and credentials
- Run the Application:
- Compile and run the application from your IDE
- Use the GUI to perform CRUD operations on the database