SpringBoot_OneToOne_Mapping

Spring Boot One-To-One Mapping

Overview

This project demonstrates a simple Spring Boot application with a one-to-one relationship mapping between two entities using Hibernate and MySQL. The application showcases how to set up and manage one-to-one relationships in a Spring Boot environment.

Technologies Used

Features

Getting Started

Prerequisites

Installation

  1. Clone the Repository:

     git clone https://github.com/Pranaydalvi/SpringBoot_OneToOne_Mapping.git
    
  2. Navigate to the Project Directory:

     cd SpringBoot_OneToOne_Mapping
    
  3. Configure MySQL Database:

    Update the application.properties file in src/main/resources with your MySQL database details:

     spring.datasource.url=jdbc:mysql://localhost:3306/your_database
     spring.datasource.username=your_username
     spring.datasource.password=your_password
    
  4. Build the Project:

     mvn clean install
    
  5. Run the Application:

     mvn spring-boot:run
    

Usage

The application exposes RESTful APIs for managing User and UserProfile entities. Here are some example endpoints:

Code Structure