From 9c0cd93508824fe632373f4365cf013e0f0e28a4 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Fri, 22 Feb 2019 11:06:17 +0800 Subject: [PATCH] update document --- .../com/xxl/job/admin/dao/XxlJobRegistryDaoTest.java | 9 ++++----- .../XxlJobExecutorExampleBootApplicationTests.java | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobRegistryDaoTest.java b/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobRegistryDaoTest.java index 69448727..016c4f23 100644 --- a/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobRegistryDaoTest.java +++ b/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobRegistryDaoTest.java @@ -1,17 +1,16 @@ package com.xxl.job.admin.dao; import com.xxl.job.admin.core.model.XxlJobRegistry; -import com.xxl.job.admin.dao.XxlJobRegistryDao; import org.junit.Test; import org.junit.runner.RunWith; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; import java.util.List; -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = "classpath*:spring/applicationcontext-*.xml") +@RunWith(SpringRunner.class) +@SpringBootTest public class XxlJobRegistryDaoTest { @Resource diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/test/java/com/xxl/job/executor/test/XxlJobExecutorExampleBootApplicationTests.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/test/java/com/xxl/job/executor/test/XxlJobExecutorExampleBootApplicationTests.java index f8396a06..fdccb3b7 100644 --- a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/test/java/com/xxl/job/executor/test/XxlJobExecutorExampleBootApplicationTests.java +++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/test/java/com/xxl/job/executor/test/XxlJobExecutorExampleBootApplicationTests.java @@ -1,12 +1,12 @@ package com.xxl.job.executor.test; import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; -/*@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = Application.class) -@WebAppConfiguration*/ -/*@RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class ,webEnvironment= SpringBootTest.WebEnvironment.DEFINED_PORT)*/ +@RunWith(SpringRunner.class) +@SpringBootTest public class XxlJobExecutorExampleBootApplicationTests { @Test