1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<
plugin
>
<
groupId
>org.eclipse.jetty</
groupId
>
<
artifactId
>jetty-maven-plugin</
artifactId
>
<
version
>9.2.3.v20140905</
version
>
<
configuration
>
<
stopPort
>9966</
stopPort
>
<
stopKey
>stop</
stopKey
>
<!-- Listen to port 8983 -->
<
httpConnector
>
<
port
>8983</
port
>
<
idleTimeout
>60000</
idleTimeout
>
</
httpConnector
>
<
reload
>automatic</
reload
>
<!-- Read system properties from profile specific configuration file -->
<!--<systemPropertiesFile>${project.basedir}/profiles/${build.profile.id}/config.properties</systemPropertiesFile>-->
<!-- Set the context path -->
<
webApp
>
<
contextPath
>/zhixin-search</
contextPath
>
</
webApp
>
</
configuration
>
</
plugin
>
|
启动:
1
|
mvn -Dslf4j=
false
-Dlog4j.configuration=
file
:.
/target/classes/log4j
.properties jetty:run -Djetty.reload=automatic -Djetty.scanIntervalSeconds=10
|
重新加载会耗费大量内存,这也是一个通病!
本文转自 梦朝思夕 51CTO博客,原文链接:http://blog.51cto.com/qiangmzsx/1631253