Giter Site home page Giter Site logo

spring-boot-api-tutorial's Introduction

Web API with Spring Boot, H2, JPA and Hibernate

This is a sample CRUD API with spring, it is a part of course I have on my YouTube channel https://youtube.com/@wanubit. More about me or Wanubit company on https://wanubit.com

Requirements

The list of tools required to build and run the project:

  • Open JDK 17
  • Apache Maven 3.8

Steps to Set up

1. Clone the application

[email protected]:asmaur/spring-boot-api-tutorial.git

Building

In order to build project use:

mvn clean package

Alternatively, you can run the app without packaging it using -

mvn spring-boot:run

The app will start running at http://localhost:8080

Configuration

Configuration can be updated in application.yaml or using environment variables.

In tutorialapp/src/main/java/com.wanubit.tutorialapp:

  • TutorialAppApplication - Spring Boot application entry point, bean definition,
  • domain/* - entity classes for Category and Tutorial,
  • dto/* - DTO classes for Category and Tutorial,
  • mapper/* - mapping functions between entities and DTO,
  • repository/* - repository interface and declarations,
  • service/* - services declarations,
  • impl/* - services implementations,
  • controller/* - controllers declarations and implementations,

Explore Rest APIs

The app defines following CRUD APIs.

Categories Endpoints

  • GET /api/categories get all categories.

  • GET /api/categories?name=name get all categories by name.

  • POST /api/categories create new category.

  • GET /api/categories/{id} get category by id.

  • PUT /api/categories/{id} update category.

  • DELETE /api/categories/{id} delete category.

Tutorials Endpoints

  • GET /api/tutorials get all tutorials.

  • GET /api/tutorials?title=title get all tutorials by title.

  • POST /api/tutorials create new tutorial.

  • GET /api/tutorials/{id} get tutorial by id.

  • PUT /api/tutorials/{id} update tutorial.

  • DELETE /api/tutorials/{id} delete tutorial.

You can find the tutorial for this application on my YouTube channel https://youtube.com/@wanubit -

spring-boot-api-tutorial's People

Contributors

asmaur 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.