当我们把码云仓库的maven项目下载到本地后,往eclipse导入的时候会出现各种错误,多数是项目导入的时候没法自动导入maven项目中的一些包导致的,为避免出现这些错误或者其他错误,建议参照如下过程操作:
1.确保tomcat配置好;
.
2.确保jdk配置正确
.
3.确保maven环境配置好
maven的setting.xml如下配置,我用的是阿里云镜像仓库,比国外的快(如下是删除了注释代码的样子,可改了仓库路径后直接覆盖)
<localRepository>D:\A\AC</localRepository>换成你自己想要jar包存放的仓库位置
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:\A\AC</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
4.确保导入方式正确

5.确保导入后动态web已设置(3个缺一不可)
6.确保资源类都存在(最常见的是test资源文件找不到,直接remove掉test即可)
7.确保maven库不能自动导入的jar包依赖手动导入(maven Dependenices是必须的,其他三个看情况导入,如果你还有其他的依赖需求也可导入,按右边add添加)

8.至此就可以运行了,至于其他报错,则是可以不管的
如下等报错就可以暂时不管(无伤大雅,有强迫症的可以右键删除这些报错)
还有问题联系笔者