奇怪的报错
public void insert(){
Employee employee = new Employee();
employee.setEno(8888);
employee.setEname("赵六");
employee.setSalary(6666f);
employee.setDname("研发部");
employeeDao.insert(employee);
}
}
public void insert(Employee employee){
String sql = "insert into employee(eno,ename,salary,dname,hiredate) values(?,?,?,?,?)";
//利用update方法实现数据写入操作
jdbcTemplate.update(sql,new Object[]{
employee.getEno() , employee.getEname(),employee.getSalary(),employee.getDname() , employee.getHiredate()
});
}
}
五月 26, 2021 7:28:24 下午 org.springframework.test.context.support.AbstractTestContextBootstrapper getDefaultTestExecutionListenerClassNames
信息: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]
五月 26, 2021 7:28:24 下午 org.springframework.test.context.support.AbstractTestContextBootstrapper getTestExecutionListeners
信息: Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@604ed9f0, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@6a4f787b, org.springframework.test.context.support.DirtiesContextTestExecutionListener@685cb137, org.springframework.test.context.transaction.TransactionalTestExecutionListener@6a41eaa2, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@7cd62f43, org.springframework.test.context.event.EventPublishingTestExecutionListener@6d4b1c02]
java.lang.Exception: No tests found matching Method insert(jdbcTemplateTestor) from org.junit.internal.requests.ClassRequest@6093dd95
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:50)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
Process finished with exit code -1
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 9393 份
- 解答问题 16556 个
综合就业常年第一,编程排行常年霸榜,无需脱产即可学习,北上广深月薪过万 无论你是未就业的学生还是想转行的在职人员,不需要基础,只要你有梦想,想高薪
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星