Skip to content

COG-GTM/DropwizardEmployee

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee REST API using Dropwizard 1.0.5

Java 8 needed to run this code.

Dropwizard is an open source Java framework for developing REST APIs.

Libraries using from Dropwizard:

    • Jetty for serving an HTTP server inside this project'.
    • Jersey for developing RESTful Web Services in Java'.
    • Jackson for objects to/from JSON conversion'.

Using Hibernate features for the database.

Running The Application

To test the example application run the following commands.

  • To package the example run.

      mvn package
    
  • To setup the h2 database run.

      java -jar target/DropwizardEmployee-1.0.5.jar db migrate example.yml
    
  • To run the server run.

      java -jar target/DropwizardEmployee-1.0.5.jar server example.yml
    
  • To post data into the application.

    curl -H "Content-Type: application/json" -X POST -d '{"firstName":"Mayur", "lastName":"Chougule","jobTitle":"Software Engineer"}' http://localhost:8080/employee

  • To view the list of employees.

    http://localhost:8080/employee

About

A simple REST API to add and list employees using Dropwizard Java Framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%