Spring boot - upload CSV file and store records in database.
Every morning, I always feel to Learn new and Implement.
Today, I worked on Csv file upload and store records in SQL Database.
Requirement is:
- Upload Student CSV files which contains multiple properties.
- Consider mandatory fields are phoneNumber and firstName - If either of property is null ignore that record and return as failed records.
- primary key is studentId
- Use opencsv parser to convert CsvToBean
- return failed student list as Json.
Project exist in GitHub use below link to download or clone repository
Link: Spring boot - csv to sql repository
Run the project using below command:
mvn spring-boot:run
Requirement: