Skip to content
/ dmi Public

Java Spring Boot API featuring Object-Relational Mapping with JPA (Hibernate)

Notifications You must be signed in to change notification settings

alexbraga/dmi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DMI

Java Spring Boot API featuring Object-Relational Mapping with JPA (Hibernate)

GitHub last commit

Status: Finished

AboutFeaturesDiagramsHow it worksTech StackHow to contributeAuthor

About

Spring Boot order management application focused on domain model implementation. The domain model includes "client", "order", "order item", "order status" and "product" entities to be instantiated. By design, an order can be associated with only one client; on the other hand, an order can be associated with many items, but each item can only belong to a single order ("one to many" relationship), and each item is associated with a single product. The class and object diagrams can be seen here. The Object-Relational Mapping is achieved with the use of JPA (Hibernate), and the relational database chosen is the in-memory H2.


Features

  • Class and object diagrams
  • Relational database
  • Database seeding through CommandLineRunner
  • Domain model implementation with Object-Relational Mapping
  • JPA with Hibernate
  • Web service API
  • Structure divided into Entities, Repositories and Controllers
  • Classes and objects
  • Encapsulation, getters and setters
  • Enum types

Diagrams

Class Diagram

Class Diagram

Object Diagram

Class Diagram


How it works

  1. Clone this repository
  2. Run the application
  3. API Endpoints

Pre-requisites

Before getting started, you'll need to have the following tools installed on your machine:

In addition, you might also want an IDE to work with the code, like IntelliJ IDEA.

Clone this repository

git clone https://github.com/alexbraga/dmi.git

Running the application

Navigate to the root directory of the project

cd dmi

Build the project

mvn compile

Run the application

mvn spring-boot:run
  • Alternatively, open the project folder with your preferred IDE and run /src/main/java/com/example/dmi/DMIApplication.java

  • The server will start at localhost:8080

API Endpoints

  • Get all orders in the database:

    • GET /orders
  • Get order by id:

    • GET /orders/{id}

Tech Stack

The following tools were used in the construction of the project:

Language

Framework

Dependencies

  • Spring Web
  • Spring Data JPA
  • H2 Database

See the file pom.xml

Utilities


How to contribute

  1. Fork the project
  2. Create a new branch with your changes:
git checkout -b my-amazing-feature
  1. Save your changes and create a commit message (in present tense) telling what you did:
git commit -m "Add my amazing feature"
  1. Submit your changes:
git push origin my-amazing-feature
  1. Create a pull request

Author

Alexandre Braga

LinkedIn  E-Mail

About

Java Spring Boot API featuring Object-Relational Mapping with JPA (Hibernate)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages