通过maven可以看到这个资源不存在 找到本地仓库,mysql 5.17确实没有jar包 在pom.xml内把版本改成5.16 5.1.6在本地仓库内是完整的版本 运行我们的测试方法 把依赖注释掉 再次运行。这是编译器就遇到的异常 在实际写代码过程中,可能会遇到很多 在编译器就报错的,这就证明了这个类在没有依赖类的情况下是不能编译的