Skip to content

Sprout-AutoREST/Sprout-Study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprout-Study

Tasks

Create a simple Spring Boot application that provides RESTful endpoints for the following mappings:

  • GET /api/{entity}
    • Retrieve all entities
    • should return 200 with a list (can be empty)
  • GET /api/{entity}/{id}
    • Retrieve a specific entity by ID
    • should return 200 with the entity if found or 404 if not found
  • POST /api/{entity}
    • Create a new entity
    • should return 201 or 400 on invalid RequestBody
  • PUT /api/{entity}/{id}
    • Update an existing entity by ID
    • should return 200 if found, 400 on invalid RequestBody or 404 if not found
  • DELETE /api/{entity}/{id}
    • Delete an entity by ID
    • should return 204 if deleted, or 404 if not found

Names can vary on your preferred naming conventions. But the endpoints should performe the described operations.

  • One of the endpoints should also include custom business logic that exceeds the default CRUD operation. Doesn't have to be complex, just enough to show that custom logic is implemented. (e.g., a logging statement, validation, transformation, etc.)

  • Another endpoint should be a completely custom endpoint that performs none of the above operations. The logic doesn't have to be complex, just enough to show that a custom implementation is used.

  • Each read endpoint (GET endpoints) should be secured with MethodLevel Security using @PreAuthorize(”hasRole(USER)”) and each write endpoint (POST, PUT and DELETE endpoints) should be secured with role ADMIN. You don't need to implement a full authentication mechanism. The two required roles are already provided in the security configuration.

  • CURL requests will be provided for each of the basic endpoints. You can use them to test your implementation.

Branching

DO NOT UPDATE THE MAIN BRANCH DIRECTLY!

The main branch contains the initial setup of the Spring Boot application with the necessary dependencies and configurations.

Create a new branch from main for each task:

  • {UserID}/baseline - Implementation of the Endpoints with default SpringBoot.
  • {UserID}/sprout - Implementation of the Endpoints using Sprout.

Time tracking

Please track the time you need for each branch separately. You'll need the tracked time later in the survey.

Don't pressure yourself to be the fastest. The intention is to see the difference in time needed for both implementations. Not to see who is the fastest.

Thank you all for participating and happy coding!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages