1:修改該項目目錄下:.project文件eclipse
<projectDescription>
<name>SpringMVC-Annotation</name> <comment></comment> <projects> </projects>ui
2:項目右鍵屬性 --> Web Project Settings --> Context rootcode
3:修改項目目錄下:.settings\org.eclipse.wst.common.componentcomponent
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">xml
<wb-module deploy-name="SpringMVC"> <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> <property name="Java-output-path" value="/SpringMVC/build/classes"/> <property name="context-root" value="SpringMVC-Annotation"/> </wb-module>
</project-modules>ip
修改標紅色的部分。io