Git Product home page Git Product logo

spring_api_rest's Introduction

Spring API REST

An API REST build using SpringBoot.

Tech

  • Languages: Java.

  • DataBase: MySQL.

  • Framework: SpringBoot.

  • Libraries: SpringWeb, JPA, MySQL Driver, Lombok.

Installation

  1. Download this repo in your local machine.

  2. Create a MySQL Database with the following command:

    CREATE DATABASE your_db_name;
  3. Move inside this dir:

    cd /path_to_this_repo/src/main/resources
  4. Change this configuration and paste it inside application.properties:

    spring.datasource.url=jdbc:mysql://localhost/your_db_name?useSSL=false&serveTimeZone=UTC
    spring.datasource.username=your_user_name
    spring.datasource.password=your_user_password
    spring.datasource.driver-class=com.mysql.cj.jdbc.Driver
    spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
    spring.jpa.hibernate.ddl-auto=update
    logging.level.org.hibernate.SQL=debug

Usage

  1. Move inside the root folder of this repo.

  2. Execute the follow command:

    • MacOS/Linux:
    ./mvnw spring-boot:run
    • Windows:
    mvnw spring-boot:run
  3. Use any of the follow CRUD methods with the follow structure in your api tester or code:

    1. GET:

    2. POST:

      {
        "firstName": "first_name_as_string",
        "lastName": "last_name_as_string"
      }
    3. UPDATE:

      {
        "firstName": "new_first_name_as_string",
        "lastName": "new_last_name_as_string"
      }
    4. DELETE:

Author

License

spring_api_rest's People

Contributors

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