From eb51c219121ac43b8e2df3f786d76621f2cdc157 Mon Sep 17 00:00:00 2001 From: wenguang Date: Wed, 25 Mar 2020 14:33:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=8CEasyExcel=E4=BE=9D=E8=B5=96=E5=8C=85?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/test/java/com/we/WriteTest.java | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/we/WriteTest.java diff --git a/pom.xml b/pom.xml index f3470a9..1efad15 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ com.alibaba easyexcel - 1.1.2-beat1 + 2.1.6 diff --git a/src/test/java/com/we/WriteTest.java b/src/test/java/com/we/WriteTest.java new file mode 100644 index 0000000..2806754 --- /dev/null +++ b/src/test/java/com/we/WriteTest.java @@ -0,0 +1,27 @@ +package com.we; + +import com.we.pojo.Student; +import com.we.service.IStudentService; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.List; +@RunWith(SpringRunner.class) +@SpringBootTest(classes = MainApplication.class, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +public class WriteTest { + + @Autowired + private IStudentService studentService; + + + @Test + public void selectAll() { + List stus = studentService.selectStuList(); + System.out.println(stus.get(0)); + } + + +} -- GitLab