只要在方法上加上@Test就可以运行,不需要新建main方法
import org.junit.Test; public class JdbcDemo { @Test public void test(){ System.out.println("hello"); } }