All Projects → GouravRusiya30 → SpringBootRestAPI

GouravRusiya30 / SpringBootRestAPI

Licence: MIT license
A ready-to-use Template for Rest API using spring-boot-microservices, MongoDB as Database, Integrated with codecov and sonarqube, deployable to cloud.

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to SpringBootRestAPI

travis-ci-tutorial-java
Just to learn how to use travis-ci in a java project!
Stars: ✭ 38 (+58.33%)
Mutual labels:  travis-ci, jacoco, codecov
quiplash
Quiplash replacement
Stars: ✭ 25 (+4.17%)
Mutual labels:  help-wanted, springboot, beginner-friendly
Newbee Mall
🔥 🎉newbee-mall 项目(新蜂商城)是一套电商系统,包括 newbee-mall 商城系统及 newbee-mall-admin 商城后台管理系统,基于 Spring Boot 2.X 及相关技术栈开发。 前台商城系统包含首页门户、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。 后台管理系统包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。
Stars: ✭ 8,319 (+34562.5%)
Mutual labels:  springboot, springboot-sample, springboot2
yaclt
Yet Another Change Log Tool
Stars: ✭ 24 (+0%)
Mutual labels:  help-wanted, beginner-friendly, good-first-issue
My Blog
🌴A simple & beautiful blogging system implemented with spring-boot & thymeleaf & mybatis My Blog 是由 SpringBoot + Mybatis + Thymeleaf 等技术实现的 Java 博客系统,页面美观、功能齐全、部署简单及完善的代码,一定会给使用者无与伦比的体验
Stars: ✭ 2,400 (+9900%)
Mutual labels:  springboot, springboot-sample, springboot2
Web-Development
Created this new Repository for Open Source Contribution for Beginners
Stars: ✭ 25 (+4.17%)
Mutual labels:  help-wanted, beginner-friendly, good-first-issue
newbee-mall-plus
🔥 🎉newbee-mall-plus 项目是 newbee-mall 项目的升级版本,增加了优惠券模块、商品秒杀模块、支付宝支付,优化了搜索功能,后续会继续增加功能模块以及流行的技术栈。
Stars: ✭ 476 (+1883.33%)
Mutual labels:  springboot-sample, springboot2
continuous-integration-with-python
How to test your python code. How to automatically run your tests for your Python code. How to get reports of the tests coverage
Stars: ✭ 25 (+4.17%)
Mutual labels:  coveralls, travis-ci
hacktoberfest 2021
Solve the given questions, and submit a PR.💬 Make sure you submit the solution in the correct folder. ✔
Stars: ✭ 44 (+83.33%)
Mutual labels:  beginner-friendly, good-first-issue
SpringBoot-Examples
Spring boot 2.X version tutorial,Integrate various middleware to facilitate quick reference and use
Stars: ✭ 23 (-4.17%)
Mutual labels:  springboot, springboot2
dashboard
Simple code build dashboard
Stars: ✭ 14 (-41.67%)
Mutual labels:  coveralls, travis-ci
gocoverutil
No description or website provided.
Stars: ✭ 25 (+4.17%)
Mutual labels:  coveralls, codecov
react-testing-mocha-chai-enzyme
A solid test setup for React components with Mocha, Chai, Sinon, Enzyme in a Webpack/Babel application.
Stars: ✭ 48 (+100%)
Mutual labels:  coveralls, travis-ci
learning-code-through-github-repos
This is a collection of GitHub repositories that you can use in your coding journey.
Stars: ✭ 82 (+241.67%)
Mutual labels:  beginner-friendly, good-first-issue
BankOfSpring
Production ready maven based Spring Boot starter kit application with example cases of handling transactions with Spring.
Stars: ✭ 39 (+62.5%)
Mutual labels:  springboot-sample, springboot2
DataStructures-Algorithms
A collections of many CP-based or DSA-based Questions that is stored various algorithms and datastructures to increase coding aptitutde. Anybody with a knack for coding can feel free to add more solutions and questions in the respective folders
Stars: ✭ 15 (-37.5%)
Mutual labels:  beginner-friendly, good-first-issue
Hacktoberfest 2021
This repository aims to help code beginners with their first successful pull request and open source contribution. Happy coding!
Stars: ✭ 109 (+354.17%)
Mutual labels:  beginner-friendly, good-first-issue
good-first-issues
Find good first issues right from your CLI! 🚀
Stars: ✭ 64 (+166.67%)
Mutual labels:  beginner-friendly, good-first-issue
Spring-Boot-2
Spring Boot 2.x examples
Stars: ✭ 33 (+37.5%)
Mutual labels:  springboot, springboot2
Programming-Quotes
Repository containing various programming quotes
Stars: ✭ 26 (+8.33%)
Mutual labels:  help-wanted, beginner-friendly

RestAPI Template - Spring Boot + MongoDB

License: MIT Travis Build Status sonar codecov Build status

contributions welcome Open Source Love PRs Welcome first-timers-only-friendly HitCount

Desciption

A ready-to-use Template for Rest API using spring-boot-microservices, MongoDB as Database, Integrated with codecov and sonarqube, deployable to cloud. This template can be plugged into any application to kickstart task easily without writing everything from scratch.

Task List Progress

  • Rest controllers and models using SpringBoot
  • MongoDB configuration
  • TravisCI build
  • SonarQube integration
  • Jacoco Test report
  • JWT authentication
  • 80% and above Code Coverage (using codecov or coveralls)
  • Cloud deployment

Getting Started

  • Import this project into your favourite IDE after fork and checkout of this repository.

Pre-requisite and Installing Steps

  • Get a running instance of MongoDB that you can connect to. For more information on getting started with MongoDB, visit their online tutorial.

  • Start by creating a test database. I will call mine "rest_tutorial" using the following command in the MongoDB shell, or through a database manager like MongoDB Compass: use rest_tutorial;

  • Create a sample collection that will hold data about different types of pets. Let's create the collection with the following command: db.createCollection("pets");

  • Once the collection is created, we need to add some data! We can add data to the collection with the below query, you can add any number of data like this : db.pets.insertMany([ { "name" : "Spot", "species" : "dog", "breed" : "pitbull" }, { "name" : "Daisy", "species" : "cat", "breed" : "calico" }, { "name" : "Bella", "species" : "dog", "breed" : "australian shepard" } ]);

  • Add the mongodb authentication-database, username & password in application.properties If there is no authentication when you are running locally then you can also remove these properties from this file.

  • Create the user roles in the database. The user roles can be one of "USER, MODERATOR or ADMIN"

db.roles.insertMany([
   { name: "ROLE_USER" },
   { name: "ROLE_MODERATOR" },
   { name: "ROLE_ADMIN" },
])

Running the tests

Once the server starts, your first need to register a user and login as that user to get a token.\

user registration
User login

Once you get the token, you need to pass that token for every request you make to the backend In the postman, select the "header" section and enter Authorization for the key and
"Bearer " for the value

you are free to test your API however you choose. Use postman for the below tests :

getAllPets
getPetById
createPet
deletePet
modifyPetById

Once done with all the testing, you can logout using the endpoint /api/auth/logout

logout

Code Coverage

For code coverage reports integration, I have shown example using Codecov and Coveralls as both are pretty popular and easy to integrate with the travis.

Issue Request Template

Are you up for your first Issue Request for this project !!! Awesome but please first go through the ISSUE TEMPLATE.md and use this template to submit any issue request.

Pull Request Template

Are you up for your first PR for this project !!! Awesome but please first go through the PULL REQUEST TEMPLATE.md and use this template to submit your PR.

Contributing

Please read CONTRIBUTING.md and CODE OF CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Gourav Rusiya
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].