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.ActiveProfiles;
@ActiveProfiles("dev") @RunWith(SpringRunner.class) @SpringBootTest
//测试类与主启动类的包名必须一致
public class SpringTest { @Autowired(required=true) private CheckServerMapper checkServerMapper; @Test public void test5() { String transdt = "20201001"; checkServerMapper.deleteProcedure(); checkServerMapper.selectTransFlowByDay(transdt); //获取游标返回参数 List<TransFlow> transList = checkServerMapper.selectExec(transdt); System.out.println(transList.toString()); }