正常能用的依赖是这样的:
mybatis 3.4.5的依赖文件夹
其中,需要导入项目的是:mybatis-3.4.5.jar。
如果正常的导入项目中,应该如图所示:
验证是否已经导入项目中
而我的项目中出现的问题是,在依赖包中,只有一个1KB的后缀为lastUpdated的文件,可以看图一中最后两个文件;
执行mvn的install命令,会发现出现build failed,这时查看报错就会发现为:
Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 from/to alimaven (https://maven.aliyun.com/repository/central): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
也就是unable to find valid certification path to requested target问题,这个问题在网上会有详解——是一个安全证书问题,可以参考这篇文章:
彻底解决unable to find valid certification path to requested target
然而不知是操作失误,还是其他问题,并没有成功,最终是看了这篇文章才顺利解决问题
IDEA unable to find valid certification path to requested target
当然在此期间要不断reimport,install,删除依赖添加依赖再reimport,update仓库等等常用的操作。