tomcat-maven-plugin 插件使用

配置

在pom.xm 加入以下xml。

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <path>/wp</path>
                    <port>8080</port>
                    <uriEncoding>UTF-8</uriEncoding>
                    <url>http://localhost:8080/manager/html</url>
                    <server>tomcat6</server>
                </configuration>
            </plugin>

简要说明一下:

path  是访问应用的路径

port 是tomcat 的端口号

uriEncoding  URL按UTF-8进行编码,这样就解决了中文参数乱码。

Server 指定tomcat名称。

配置就这么简单,基本搞掂,下面看看如何使用。

原文地址:https://www.cnblogs.com/qiumingcheng/p/5815033.html