Giter Club home page Giter Club logo

customer-api's Introduction

Getting Started

Start Application

  • Run the CustomerapiApplication Application
  • Default application runs on the port 8080 and url to access application http://localhost:8080
  • This app also embedded with the actuator, by default has health check endpoint /health
  • When there are any port errors in the console, override the port by setting the server.port=808x (where x is any number) in the application.properties
  • Application comes with H2 in memory database.
  • To run the application with Microsoft SQL Server
    • Add the dependency in build.gradle file

      implementation 'com.microsoft.sqlserver:mssql-jdbc'
      
    • Add the below configuration in application.properties

      spring.jpa.properties.hibernate.format_sql=true
      spring.datasource.url= jdbc:sqlserver://localhost:1433;encrypt=true;trustServerCertificate=true;databaseName=sqlserver_db
      spring.datasource.username= sqlserver
      spring.datasource.password= admin
      spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.SQLServerDialect
      spring.jpa.hibernate.ddl-auto= update
      

Test the api from postman

  • Postman collection is available at location src\test\newman
  • Here is the reference link to import the postman collection
  • Once the Postman collection is imported, it will contain all the customer operations.
    • GET is to SELECT SQL operation
      • Get all the list of Customers GET http://localhost:8080/api/customers
      • Get a customer with id http://localhost:8080/api/customers/{id}
    • POST is INSERT SQL Operation
      • Add customer POST http://localhost:8080/api/customers. Customers details will be send in the RequestBody.
    • PUT is to UPDATE SQL Operation
      • Update Customer PUT http://localhost:8080/api/customers/{id} Customers details will be send in the RequestBody.
    • DELETE is to DELETE SQL Operation
      • Delete Customer DELETE http://localhost:8080/api/customers/{id}

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Additional Links

These additional references should also help you:

customer-api's People

Contributors

vykuntarao-n 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.