Use EasyExcel to realize CSV file reading and writing function, and use Idea to create SpringBoot project integration swagger3

1. Idea creates SpringBoot project:

As shown in the picture:
insert image description here

Select Spring Init

Set groupid and other information, select jdk version, others can be default;

When using the default method to create a project, sometimes a connection timeout error will be reported;

At this time, you need to modify the serverURL; (this is not necessary)
insert image description here
The generated project directory is as follows:
insert image description here
Since the maven warehouse is on the external network and the network connection is slow, it is recommended to set the domestic source; the most commonly used is the above configuration;

so far. One project is built;

2. CSV file parsing

EasyExcel is a simple, memory-saving open source project for reading and writing Excel based on Java. In the case of saving memory as much as possible, it supports reading and writing Excel of hundreds of M. It is supported in version 3.0.0-beta1, and it will be automatically judged when reading, just like reading Excel. But when writing, you need to specify excelType as CSV;

easyexcel official website address: here

GitHub source address &

Guess you like

Origin blog.csdn.net/weixin_42551921/article/details/127510300