使用maven-tomct7插件运行web工程

优点:比eclipse的tomcat插件要快

第一步:将下面的插件拷贝到controller的pom.xml文件下

<build>
		<plugins>
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<configuration>
					<port>8080</port>
					<server>tomcat7</server>
					<path>/</path>
					<useBodyEncodingForURI>true</useBodyEncodingForURI>
					<uriEncoding>UTF-8</uriEncoding>
				</configuration>
			</plugin>
			
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<additionalProjectnatures>
						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
					</additionalProjectnatures>
					<additionalBuildcommands>
						<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
					</additionalBuildcommands>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
				</configuration>
			</plugin>
		</plugins>
	</build>

第二步:对debug做相应的配置,new

猜你喜欢

转载自blog.csdn.net/Richard_666/article/details/85060939