GithubHelp home page GithubHelp logo

mharisraza / quarkus-simple-crud Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 190 KB

This project uses Quarkus, the Supersonic Subatomic Java Framework.

Java 100.00%
crud-api quarkus quarkus-application quarkus-hibernate-orm

quarkus-simple-crud's Introduction

Quarkus CRUD API

This project is a simple CRUD (Create, Read, Update, Delete) API implemented using the Quarkus framework. It serves as a learning exercise for Java developers familiar with Spring Boot who want to explore Quarkus and its benefits.

Introduction

The Quarkus CRUD API project provides a straightforward implementation of a CRUD API using Quarkus. It demonstrates the fundamental concepts of Quarkus, such as dependency injection, RESTful web services, data persistence.

The goal of this project is to help Java developers familiar with Spring Boot transition to Quarkus by comparing the two frameworks and showcasing the benefits of using Quarkus in terms of performance and resource consumption.

Prerequisite:

  • MySQL (8.0 Preferred)
  • Java (17 Preferred)

Project Structure

The project follows a standard Maven project structure. The main components of the project are as follows:

  • src/main/java: Contains the Java source code of the application.
  • src/main/resources: Contains the configuration files and static resources.
  • src/test/java: Contains the test cases for the application.
  • src/test/resources: Contains the test configuration files.

  • src/main/java/com/harisraza/resources: Contains the resources (controllers) classes responsible for handling the API endpoints.
  • src/main/java/com/harisraza/services: Contains the service interfaces and inside /impl directory contains their respective implementation classes for implementing business logic.
  • src/main/java/com/harisraza/exceptions: Contains the exception classes and inside /handles directory contains their's respective handling classes to handle exception when thrown.

The Quarkus CRUD API exposes the following endpoints:

  • GET /api/note/{id}: Retrieve an note by its ID.
  • POST /api/note: Creates a new note.
  • PUT /api/note/{id}: Updates an existing item by providing its ID.
  • DELETE /api/note/{id}: Deletes an note.

The API follows RESTful conventions and returns JSON responses.

Configuration

Go to the src/main/resources/ and edit the application.properties to configure MySQL Database name and credentials.

Running the Application

To run the Quarkus CRUD API, execute the following command:

if maven installed: mvn compile quarkus:dev else: ./mvnw compile quarkus:dev

Have fun coding!

quarkus-simple-crud's People

Contributors

mharisraza avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.