1. 程式人生 > >springmvc+maven專案 中web.xml版本問題

springmvc+maven專案 中web.xml版本問題

新建時候寫的是2.3 改成3.0出問題  按照網上的把以下兩個地方修改了還是報錯


最終查到需要在專案pom.xml中加入

<profiles>
		<profile>
			<id>jdk-1.8</id>
			<!-- 另外一種啟用方式 -->
			<activation>
				<activeByDefault>true</activeByDefault>
				<jdk>1.8</jdk>
			</activation>
			<properties>
				<maven.compiler.source>1.8</maven.compiler.source>
				<maven.compiler.target>1.8</maven.compiler.target>
				<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
			</properties>
		</profile>
	</profiles>
然後右鍵專案 maven  →update project...完美解決  特此記錄