Giter Club home page Giter Club logo

employee-management's Introduction

Employee Management -

Spring boot application integrated with mongo atlas and apache kafka running on local.

Pre-requisites -

  1. Maven
  2. Java 8
  3. Sonar (for coverage and static code analysis)

To run the application -

  1. Start Zookeeper
  2. Start Kafka server
  3. Navigate to the employee-management directory
  4. Execute
mvn spring-boot:run
  1. The application runs on localhost:8080

To run tests in the application with jacoco -

  1. Navigate to the employee-management directory
  2. Execute
mvn clean test

To run sonar -

  1. Start local sonar server
  2. Navigate to the employee-management directory
  3. Execute
mvn sonar:sonar

JSON structure -

Employee object -

{id: Integer,
firstName: String,
lastName: String,
designation: String,
department: String,
salary: int}

EmployeeAddress object -

{id: Integer,
address: String}

REST APIs -

Include Basic Authorization header with username : user and password : 123456 (defined in application.properties)

  1. Add Employee to mongo -

POST /employee Request body - Employee JSON

  1. Get Employee by ID from mongo -

GET /employee/{ID}

  1. Update Employee in mongo -

PUT /employee Request body - Employee JSON

  1. Delete Employee from mongo -

DELETE /employee/{ID}

  1. Add multiple employees to mongo -

POST /employees Request body - Array of Employee JSON

  1. Get all employees from mongo -

GET /employees

  1. Delete all employees from mongo -

DELETE /employees

  1. Add employee address to Kafka -

POST /employeeAddress Request body - EmployeeAddress JSON

  1. Get employee address from Kafka -

GET /employeeAddress/{ID}

  1. Get employee with address from mongo and Kafka -

GET /employee/withAddress/{ID}

  1. Get all employees with address from mongo and Kafka -

GET /employees/withAddress

Configurations -

Defined in application.properties for mongo, kafka and spring security

employee-management's People

Contributors

kaushik51094 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.