知道在tomcat中可以在server.xml下修改,但是现在tomcat配置在maven中,请问如何修改

解决方案 »

  1.   

    <plugin>   
      <groupId>org.apache.tomcat.maven</groupId>   
      <artifactId>tomcat7-maven-plugin</artifactId>   
      <version>2.1</version>   
      <configuration>      
        <hostName>localhost</hostName>    <!--   Default: localhost -->  
        <port>8080</port>    <!-- 启动端口 Default:8080 --> 
        <path>/api</path>    <!-- 访问应用路径  Default: /${project.artifactId}-->  
        <uriEncoding>UTF-8</uriEncoding>      <!-- uri编码 Default: ISO-8859-1 -->
        <maxPostSize>0</maxPostSize>
      </configuration>
    </plugin>
      

  2.   

    <plugin>   
      <groupId>org.apache.tomcat.maven</groupId>   
      <artifactId>tomcat7-maven-plugin</artifactId>   
      <version>2.1</version>   
      <configuration>      
        <hostName>localhost</hostName>    <!--   Default: localhost -->  
        <port>8080</port>    <!-- 启动端口 Default:8080 --> 
        <path>/api</path>    <!-- 访问应用路径  Default: /${project.artifactId}-->  
        <uriEncoding>UTF-8</uriEncoding>      <!-- uri编码 Default: ISO-8859-1 -->
        <maxPostSize>0</maxPostSize>
      </configuration>
    </plugin>
    <maxPostSize>0</maxPostSize>