GithubHelp home page GithubHelp logo

siriusb79 / spring-boot-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piotrmludzik/spring-boot-project

0.0 0.0 0.0 2.7 MB

Codecool Team Work project | use Spring Boot, REST Api, CRUD

Java 72.93% HTML 27.07%

spring-boot-project's Introduction

Spring Boot Project

Create a REST API using Boot. What is this API supposed to do? It is up to you. You only have to conform to the requirements listed below.

Requirements

  1. Use Spring Boot to create the project.
  2. Define from 2 to 3 resources.
  3. Handle CRUD operations on these resources.
  4. Between two of available resources, relationship has to be defined.
  5. You HAVE to use H2 or PostgreSQL database.
  6. Keep separate concerns of your app - controller, service, repository. Make sure responsibilities are not mixed, e.g. controller is responsible for operating on HTTP layer and passing data further, only.

After fulfilling these requirements check the next page!

What about front-end?

If you are willing to learn more front-end you are more than welcome to implement a client application to interact with the API.

Github Classroom

https://classroom.github.com/a/H9aQ7QzH

New requirements

So you think you've finished your project, huh? Sorry, but successful IT projects are usually a never ending story. So imagine that a CTO comes to you and says:

You're API is great, it would be nice if we could track it's usage. So please log every operation to a text file using log4j. All errors should be logged as well. Your architecture is S.O.L.I.D. so it won't be a problem for you, will it?

You agree to do that of course. Than a CMO comes and says:

Hey, I've seen the API that you've made, it's fantastic. I'd like to ask you for a little modification. When a user deletes something I don't want it to be actually deleted but marked as archived, so that the user doesn't see it but I can access historical data and make my marketing analysis. CTO told me that you know Open Closed Principle well and implementation of this feature won't take long.

You don't want to mess with your CMO because CTO has a crush on her, so you agree again. Now, you're about to leave work and go home but CEO comes in and says:

Your API is one of our best products. Thus we need to keep it stable. Please keep me informed about any errors that occur. Ideally I'd like your application to send me emails with error details. Is it possible to do that?

Of course it is. Everything is possible in programming. The next day comes CDO and says:

Hi, I've got a bunch of csv files that I'd like to import to your system, but making a separate request for each row would take me ages. Can you do something about that?

Now you should know that only constant in IT world is change.

So the new requirements are:

  • Logging of every CRUD operation and exception to a text file using log4j
  • Data should be safe deleted - archived instead of physically deleted. Users should not see archived data but the data should be present in the database
  • (Optionally) - send an email whenever an status code 500 is to be sent
  • (Optionally) - bulk insert feature from csv using CLI

spring-boot-project's People

Contributors

theonlymagdela avatar janiszewskipeter avatar piotrmludzik 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.