我正在使用Jetty 9,我有jetty.base和jetty.home,我想知道什么时候我开始码头,它以什么样的顺序称它为jetty.base和jetty.home,我的意思是它会从jetty.base或jetty.home读取库吗?或者检查属性形式jetty.base然后从jetty.home检查,反之亦然,如果你知道任何有用的文章,或任何方式在我的码头内测试它,我很欣赏。
答案 0 :(得分:2)
使用--list-config
选项查看输出。它告诉你订单。
$ java -jar /opt/jetty/jetty-distribution-9.3.0.v20150612/start.jar --list-config
Java Environment:
-----------------
java.home = /home/joakim/java/jvm/jdk-8u45/jre
java.vm.vendor = Oracle Corporation
java.vm.version = 25.45-b02
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.info = mixed mode
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.8.0_45-b14
java.io.tmpdir = /tmp
user.dir = /home/joakim/static-base
user.language = en
user.country = US
Jetty Environment:
-----------------
jetty.version = 9.3.0.v20150612
jetty.tag.version = master
jetty.home = /opt/jetty/jetty-distribution-9.3.0.v20150612
jetty.base = /home/joakim/static-base
Config Search Order:
--------------------
<command-line>
${jetty.base} -> /home/joakim/static-base
${jetty.home} -> /opt/jetty/jetty-distribution-9.3.0.v20150612
JVM Arguments:
--------------
(no jvm args specified)
System Properties:
------------------
(no system properties specified)
Properties:
-----------
jetty.port = 8080
Jetty Server Classpath:
-----------------------
Version Information on 11 entries in the classpath.
Note: order presented here is how they would appear on the classpath.
changes to the --module=name command line options will be reflected here.
0: 3.1.0 | ${jetty.home}/lib/servlet-api-3.1.jar
1: 3.1.0.M0 | ${jetty.home}/lib/jetty-schemas-3.1.jar
2: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-http-9.3.0.v20150612.jar
3: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-server-9.3.0.v20150612.jar
4: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-xml-9.3.0.v20150612.jar
5: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-util-9.3.0.v20150612.jar
6: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-io-9.3.0.v20150612.jar
7: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-security-9.3.0.v20150612.jar
8: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-servlet-9.3.0.v20150612.jar
9: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-webapp-9.3.0.v20150612.jar
10: 9.3.0.v20150612 | ${jetty.home}/lib/jetty-deploy-9.3.0.v20150612.jar
Jetty Active XMLs:
------------------
${jetty.home}/etc/jetty.xml
${jetty.home}/etc/jetty-http.xml
${jetty.home}/etc/jetty-deploy.xml
请注意标题为“配置搜索顺序”的部分?