Posts

Showing posts with the label Spring Boot Examples

Kotlin + Spring Boot + Apache Commons Export Data to CSV Example

Image
 Hello everyone, today we will learn how to export and download the data as a CSV file in a Kotlin + Spring Boot project. CSV stands for Comma-Separated-Values and it's a common format for doing a bulk data transfer between systems. For creating and parsing CSV files, we will use Apache Commons' 3rd-party library.  Project Directory: Technologies used: Kotlin Spring Boot Apache Commons Spring Data JPA H2DB Maven Maven[pom.xml] <? xml version ="1.0" encoding ="UTF-8" ?> < project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi :schemaLocation ="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion > 4.0.0 </ modelVersion > < parent > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-starter-parent </ artifactId >

Kotlin + Spring Boot + OpenCSV Export Data to CSV Example

Image
Hello everyone, today we will learn how to export and download the data as a CSV file in a Kotlin + Spring Boot project. CSV stands for Comma-Separated-Values and it's a common format for doing a bulk data transfer between systems. For creating and parsing CSV files, we will use OpenCSV 3rd-party library. Project Directory Technologies used: Kotlin Spring Boot OpenCSV Spring Data JPA H2DB Maven Maven[pom.xml] <? xml version ="1.0" encoding ="UTF-8" ?> < project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi :schemaLocation ="http://maven.apache.org/POM/4.0.0  https://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion > 4.0.0 </ modelVersion > < parent > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-starter-parent </