Skip to content

A Spring Boot Microservice with PostgreSQL Database Implementation.

Notifications You must be signed in to change notification settings

sm43/spring-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fe8b6ba · Oct 13, 2020

History

13 Commits
Nov 9, 2019
Oct 6, 2020
Nov 9, 2019
Oct 13, 2020
Nov 9, 2019
Nov 9, 2019
Nov 9, 2019

Repository files navigation

Spring App

To Run the Microservice locally -

Prerequisites

  • Maven
  • PostgreSQL
  • Browser or Postman

Step 1 - Download the code from github

git clone https://github.com/SM43/Spring-App.git

Step 2 - Build the project Open the project in any editor like Intellij or Eclipse and build from terminal by executing the following command.

mvn install

Step 3 - Launch the Application Before launching the Application, edit application.properties as per your Postgres credentials.

mvn spring-boot:run

Note : Running the appUserstable will be created in database and few users will be added by default. Stopping the application will delete the database.

Step 4 - Use Curl or Postman to test the REST APIs. By default it runs on port 8080.

APIs for PostgreSql usage -

  • Get list of users - http://localhost:8080/users/list

  • Add a user - http://localhost:8080/users/add/<name>/<city>

  • Delete a user - http://localhost:8080/users/delete/<id of user>

  • Get user count - http://localhost:8080/users/count

About

A Spring Boot Microservice with PostgreSQL Database Implementation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages