Code Monkey home page Code Monkey logo

spring-boot-rest-api's Introduction

REST API using Spring Boot

This is a basic REST API project developed using the Spring Boot framework. It provides a foundation for building web applications and services that follow the REST architectural style.

Features

  • Exposes a set of RESTful endpoints to perform CRUD operations on data entities.
  • Utilizes the Spring Data JPA library for easy database access and management.
  • Implements the standard HTTP methods (GET, POST, PUT, DELETE) to handle different operations.
  • Supports JSON as the data exchange format.

Prerequisites

Before running the application, ensure you have the following prerequisites installed:

  • Java Development Kit (JDK) 8 or higher
  • Maven

Installation

  1. Clone the repository from GitHub: git clone https://github.com/SudarshanSirsi/Spring-boot-Rest-Api.git

  2. Open Eclipse or Spring Tool Suite (STS).

  3. Import the project into the IDE:

  • Click on "File" -> "Import".
  • Select "Existing Maven Projects" and click "Next".
  • Browse to the project directory and click "Finish".

Configuration

  1. Open the application.properties file located in the src/main/resources directory.

  2. Modify the following properties according to your database configuration:

 spring.datasource.url=jdbc:mysql://localhost:3306/your-database
 spring.datasource.username=your-username
 spring.datasource.password=your-password

You can change the database URL, username, and password to match your environment.

Usage

  1. Start the application by running the main class RestapiApplication.java.

  2. Once the application is up and running, you can access the API endpoints using a tool like cURL or an API testing tool like Postman.

The base URL for the API is http://localhost:8080.

  1. Use the available endpoints to perform CRUD operations on the data entities. Here are the basic endpoints:
  • GET /courses: Retrieves all entities.
  • GET /courses/{id}: Retrieves a specific entity by ID.
  • POST /courses: Creates a new entity.
  • PUT /courses/{id}: Updates an existing entity by ID.
  • DELETE /courses/{id}: Deletes an entity by ID.

Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

spring-boot-rest-api's People

Contributors

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