Giter Club home page Giter Club logo

employeeserv-t23_24's Introduction

employeeserv

Application Overview

employeeserv is a spring boot rest application which would provide the CRUD operations for Employee resource.

There are three modules in this application

  • employeeservApi - This module contains the interface.
    • v1/schema/employee.json defines the employee resource.
    • jsonschema2pojo-maven-plugin is being used to create Employee POJO from json file.
    • EmployeeResource.java is the interface for CRUD operations on Employee resource.
      • GET /v1/bfs/employees/{id} endpoint is defined to fetch the resource.
  • employeeservImplementation - This module contains the implementation for the rest endpoints.
    • EmployeeResourceImpl.java implements the EmployeeResource interface.
  • employeeservFunctionalTests - This module would have the functional tests.

How to run the application

  • Please have Maven version 3.3.3 & Java 8 on your system.
  • Use command mvn clean install to build the project.
  • Use command mvn spring-boot:run from employeeservImplementation folder to run the project.
  • Use postman or curl to access http://localhost:8080/v1/bfs/employees/1 GET endpoint. It will return an Employee resource.

Assignment

We would like you to enhance the existing project and see you complete the following requirements:

  • employee.json has only name, and id elements. Please add date of birth and address elements to the Employee resource. Address will have line1, line2, city, state, country and zip_code elements. line2 is an optional element.
  • Add one more operation in EmployeeResource to create an employee. EmployeeResource will have two operations, one to create, and another to retrieve the employee resource.
  • Implement create and retrieve operations in EmployeeResourceImpl.java.
  • Resource created using create endpoint should be retrieved using retrieve/get endpoint.
  • Please use h2 in-memory database or any other in-memory database to persist the Employee resource. Dependency for h2 in-memory database is already added to the parent pom.
  • Please make sure the validations are done for the requests.
  • Response codes are as per rest guidelines.
  • Error handling in case of failures.

Assignment submission

Thank you very much for your time to take this test. Please upload this complete solution in Github and send us the link to [email protected].

employeeserv-t23_24's People

Watchers

Sugandh Sagar 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.