Article From:https://www.cnblogs.com/coder-lzh/p/9062222.html

tomcatPlug in: very practical, the feature is not configured tomcat, you can modify the port number arbitrarily.

<plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <!-- Specify port -->< port> 9001< /port><! -- request the path - ≫< path> /< /path>< uriEncoding> UTF-8</uriEncoding>< /configuration>< /plugin>

Package plug-in: Maven will pack your java files and resource files when you are in install. But sometimes XML or other files do not go in, causing inexplicable problems. This is very practical

<resources>
                <resource>
                    <directory>src/main/java</directory>
                    <includes>
                        <include>**/*.properties</include>
                        <include>**/*.xml</include>
                    </includes>
                    <filtering>false</filtering>
                </resource>
                <resource>
                    <directory>src/main/resources</directory>
                    <includes>
                        <include>**/*.properties</include>
                        <include>**/*.xml</include>
                    </includes>
                    <filtering>false</filtering>
                </resource>
            </resources>

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *