1. 程式人生 > >使用maven-tomct7外掛執行web工程

使用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