Code Monkey home page Code Monkey logo

simple-spring-web's Introduction

Simple Spring Web Application

This is a simple app to show code Assessment. Show some topics like:

  • Clean code
  • Multi-tier architecture(such as MVC)
  • Unit and integration testing
  • Logging
  • Exception handling
  • Documentation

, etc...


The database of use in this project does not have Data Migration like flyway to simplify of project.

App has swagger Api (use spring-doc) to generate API Doc for this project.

img.png

This project uses an MVC design pattern.

img.png

Some library and technology used in this project:

  • Java 17
  • Spring Web
  • Spring Data
  • Spring Batch
  • Spring AOP
  • H2 Database
  • Hibernate ORM
  • JUnit
  • Lombok
  • ...

after the application started, the spring batch used spring rest-client query to another API service and get data from it and inside local memory database.

now time we can use spring rest controller to crud of data in mem database.


Some of rest point of this project is:

Posts API’s:
Method Context Detail
GET Get all posts(with pagination)
GET /posts/1 Get post by post id
GET /posts/1/comments Get comments of specific post by post id
GET /posts?title=eos Get all posts that have the “eos” keyword in their title
POST Create a post
PATCH /posts/1 Update a post by post id
DELETE /posts/1 Delete a post by post id
Comments API’s:
Method Context Detail
GET Get all comments(with pagination)
GET /comments?postId=1 Get comments of specific post by post id
POST Create a comments
PATCH /comments/1 Update a comment by postcomment id
DELETE /comments/1 Delete a comment by comment id
ToDo’s API’s:
Method Context Detail
GET Get all to-do’s
GET /todos?userId=1&completed=true Get to-do’s of specific user by user id and completed field

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.