美文网首页
IDEA not auto reload after hot s

IDEA not auto reload after hot s

作者: e43ef8a56980 | 来源:发表于2018-11-28 20:29 被阅读0次
<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>utf8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.8.v20150217</version>
                <configuration>
                    <webApp>
                        <contextPath>/ditui</contextPath>
                    </webApp>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <httpConnector>
                        <!-- <host>localhost</host> -->
                        <port>9999</port>
                    </httpConnector>
                    <reload>manual</reload>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <path>/ditui</path>
                    <url>${tomcat-url}</url>
                    <server>tomcat7</server>
                    <username>admin</username>
                    <password>111111</password>
                </configuration>

            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <!-- specify UTF-8, ISO-8859-1 or any other file encoding -->
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>

Run configuration

image.png

C-S-F9 HotSwap, then Okay
<reload> in plugin is the key

相关文章

网友评论

      本文标题:IDEA not auto reload after hot s

      本文链接:https://www.haomeiwen.com/subject/gjzzqqtx.html