大神博客链接:
https://blog.csdn.net/a745233700/article/details/79128094
找到项目的本地路径如:D:\\project\test1
打开项目中的 .classpath文件添加
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
.project文件的 <natures>中添加
<nature>org.eclipse.m2e.core.maven2Nature</nature>