SpringBoot RestAPI Upload Excel file to MySQL/PostgreSQL

Tutorial: SpringBoot RestAPI Upload Excel file to MySQL – SpringBoot Upload/Import and Download/Export Excel files to MySQL

Creating SpringBoot RestAPIs to upload/import and export/download Excel files to databases: PostgreSQL or MySQL is one of the most common question in the development world. Going through the tutorial post, I explain details “How to read data from Excel Sheet and insert into Database table in Spring Boot RestAPIs with Upload/Download Excel functions” by step to step with coding and give you 100% running source code. What we will do?

– I draw full diagram architecture of SpringBoot Upload Download Excel files service.
– I implements how to Excel File service using poi-ooxml.
– I implement SpringBoot Upload Download files RestApis.
– I use Spring JPA to interact with database MySQL.
– I implement a global exception handling to deal with a big uploading file
– I use Ajax and Bootstrap to develop frontend for uploading and downloading excel files.

Related posts:


Continue reading “SpringBoot RestAPI Upload Excel file to MySQL/PostgreSQL”

How to integrate SpringBoot 2.x with PostgreSQL database using Spring JPA

How to integrate SpringBoot and PostgreSQL? It is the one of most common questions for developers. So in the post, I will help you to try it with Spring JPA. Here is a to do list for the tutorial:

  • Overview of Project Structure
  • Create SpringBoot with Spring Data JPA and PostgreSQL dependencies
  • Configuration SpringBoot to connect to PostgreSQL
  • Define a data model to map with table’s columns in PostgreSQL database
  • Define a JPA Repository to do CRUD operations
  • Use CommandLineRunner to excute above JPA Repository APIs: save, retrieve, update, detele entities

To do the tutorial, you need prepare Java >= 1.8, Spring Tool Suite in local computer for development.

Let’s go !
Continue reading “How to integrate SpringBoot 2.x with PostgreSQL database using Spring JPA”