Jetty网站根目录

开发环境下,配置jetty-maven插件:

            <plugin>

                <groupId>org.mortbay.jetty</groupId>

                <artifactId>jettymavenplugin</artifactId>

                <version>${jetty.version}</version>

                <configuration>

                    <connectors>

                        <connector
implementation=“org.eclipse.jetty.server.nio.SelectChannelConnector”>

                            <port>9090</port>

                        </connector>

                    </connectors>

                    <systemProperties>

                        <systemProperty>

                            <name>spring.profiles.active</name>

                            <value>development</value>

                        </systemProperty>

                    </systemProperties>

                    <useTestClasspath>true</useTestClasspath>

 

                    <webAppConfig>

                        <contextPath>/</contextPath>

                    </webAppConfig>

                </configuration>

            </plugin>

 

在Jetty服务环境下,可以直接把WAR包命名为”ROOT.war”,放到webapps目录下即可。