Dropwizard : Write Data Into Database Using Hibernate

Please follow the first two part of the tutorial before starting this:

Introduction To Dropwizard

Read Data From Database Using Dropwizard

Modify InfoDao To Persist Data

Add a method to persist data

Add POST API to store the info

Test Your API

Run your project.

Test using postman or any other rest client.

Screen Shot 2018-07-17 at 2.19.48 AM

Database screenshot to show “Yash” stored.

Screen Shot 2018-07-17 at 2.22.11 AM.png


Reference:

https://www.dropwizard.io/1.0.0/docs/manual/hibernate.html

https://dzone.com/articles/dropwizard-hibernate-mysql

Advertisements

2 thoughts on “Dropwizard : Write Data Into Database Using Hibernate

Add yours

  1. if you face any issue with the database connection, please update the dependency version of mysql-connector-java to 8.0.11

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: