Posts

Showing posts with the label RESTful API

Golang CRUD REST API MySQL Tutorial

Image
Introduction         I was searching online for a complete tutorial on Golang CRUD REST API integration with MySQL database with all the CRUD operations and I found many confusing posts. Some post did not have all the CRUD operations, some gave complicated approaches and some had other general code issues. Hence I have come up with this post to give you a comprehensive overview of all the CRUD operations. Please feel free to use my application as a base to build your own application. Golang         Go or Golang, as it is called, from their website , is an open source programming language that makes it easy to build simple, reliable, and efficient software. It is gaining popularity due to the following features: Fast: Golang is a compiled language, the code written is directly translated into formats that any processor understands.  Lightweight and minimalist language...

Spring Boot MySQL Docker Compose Example

Image
 Spring Boot MySQL Docker Compose Example Introduction         I was looking online for a simple example/tutorial on how to dockerize my existing Spring Boot and MySQL Database Microsevice using Docker Compose/Docker. Most of the tutorials have complicated examples/complex steps explained. Hence I have come up with this post to explain about Docker Compose and its usage in simple steps.          In this tutorial we will be dockerizing an existing SpringBoot fat jar with database related configurations along with MySQL database, building it and running the microservice.         To learn about Docker, simple Docker commands, Dockerfile, dockerizing a simple application and Docker Hub, please read my blog post:  Dropwizard Docker Example . Docker Compose         Compose is a tool for defining and running multi-container Docker applicatio...

Spring Boot MySQL Integration Tutorial

Image
Spring Boot MySQL Integration Tutorial Introduction         I was searching online for a complete tutorial on Spring Boot integration with MySQL database with all the CRUD operations and I was surprised that I could not find even one. The ones I found had just create and read operations or only view operation. Even the example on the official Spring website:  Accessing data with MySQL , has only create and view database operations. Hence I have come up with this post to give you a comprehensive overview of all the CRUD operations. I have also integrated HikariCP to the Spring Boot application. This will give you an optimized connection pooling. Please feel free to use my application as a base to build your own application. I am assuming that you have a Basic Knowledge of Spring Boot and have a Basic Spring Boot Application running in your machine. If not, please check my blog on Basic Spring Boot Application by going to the link:  Spring Boot Tutori...

Send Email in Java

Image
Send Email in Java Introduction         Sending an email is one of the most important and most frequently used functionalities in a technology organization. A software developer should know how this is done. This post will give you a comprehensive overview of sending emails using Java mail libraries. This post will give you an overview of the following: Send a plain text email in HTML format. Create an attachment and send an email. Use an existing file as an attachment and send an email.  As RESTful web services are commonly used today, I will be using Dropwizard for building out the email functionality as RESTful APIs. Hence here are what I will be using in this post: Java mail libraries: To connect to email service provider, compose and send emails Gmail: Email service provider Dropwizard: For developing Email functionalities as RESTful web services         Dropwizard is one of the most popular and most used frameworks ...