A recent company project has a requirement to export the data from the list and download it. As shown in the list data, and that data is not a table of data.
-------------------------------------------------Gorgeous split-line------------------------------------------------------------------ ------------------------------------
The implementation steps are as follows: the project implementation environment for MAVEN project
1. Introduce the Jia package:
2. Copy exportexcel files and readexcel files, is the tool class for reading and exporting Excel files, universal type, post blog provides download these two files.
3. Logic section:
The 3.1controller sections are as follows:
! [] (http://i2.51cto.com/images/blog/201804/04/bccacabdadb18cfa481327e467c03f08.png?x-oss-process=image/ watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=) ! [] (http://i2.51cto.com/images/blog/201804/04/4217a7d056609044351797e778d65dd3.png?x-oss-process=image/ watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=) The 3.2 service section is as follows:! [] (http://i2.51cto.com/images/blog/201804/04/c4a8dc2f63c4662bc1c28516ba3e9412.png?x-oss-process=image/ watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=) The 3.3 Serviceimpl section is as follows:! [] (http://i2.51cto.com/images/blog/201804/04/5ff7ec12e8b87b99279144fd4bccc248.png?x-oss-process=image/ watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=) The 3.4 DAO section is as follows:! [] (Http://i2.51cto.com/imagEs/blog/201804/04/a0a6df74e9972aa8df0501c6e60457f0.png?x-oss-process=image/watermark,size_16,text_ qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=) 3.5 Mapper.xml section is as follows:! [] (http://i2.51cto.com/images/blog/201804/04/c78986f905f7e8ad4beb23b917a07c7a.png?x-oss-process=image/ watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=)
4. There is also a key point, as shown in:
所以,我们创建这个实体类,部分如下: ![](http://i2.51cto.com/images/blog/201804/04/fcdabcde8ca9a5f550deb3569fa9a281.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
5. The results of the visit are as follows:
Java SSM framework for data Excel export download function