1、创建目录结构
1.1、创建目录test,目录结构要相同,同时马赛克部门的包名要相同,否则会检测不到主类,报异常!
1.2 、测试文件要变成绿色,单击java文件夹,鼠标右键,Mark Directory as 选择test
2、创建类
2.1、类上添加注解
@SpringBootTest
@RunWith(SpringRunner.class)
public class FlowableTest {}
完整代码:
@SpringBootTest
@RunWith(SpringRunner.class)
public class FlowableTest {
@Autowired
private FlowJobDao flowJobDao;
@Test
public void test(){
System.out.println("开始");
FlowJobPojo assetsAndParams = flowJobDao.getAssetsAndParams("key1594029746131");
System.out.println(assetsAndParams);
}
}