具体步骤:右击 Maven project --> Macven --> Enable Dependency Management
解决办法:
1. 选中项目 --> 右键 --> Maven --> Disable Maven Nature
此时,右键菜单中将隐藏【Maven】菜单选项
2. 选中项目 --> 右键 --> Configure --> Convert to Maven project.
3. 选中项目-->右键-->Properties-->Deployment Assembly --> Add --> Java Build Path Entries 下即可找到 Maven Dependencies
===================================以上都是废话
打开.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>