使用jetty runner 运行war 包

jetty-runner 也是一个不错的war 包运行工具,基于jetty,同时提供了丰富的cli 支持

cli

java -jar jetty-runner.jar --help
2020-05-18 20:46:56.487:INFO::main: Logging initialized @300ms to org.eclipse.jetty.util.log.StdErrLog
WARNING: jetty-runner is deprecated.
         See Jetty Documentation for startup options
         https://www.eclipse.org/jetty/documentation/
Usage: java [-Djetty.home=dir] -jar jetty-runner.jar [--help|--version] [ server opts] [[ context opts] context ...] 
Server opts:
 --version                           - display version and exit
 --log file                          - request log filename (with optional 'yyyy_mm_dd' wildcard
 --out file                          - info/warn/debug log filename (with optional 'yyyy_mm_dd' wildcard
 --host name|ip                      - interface to listen on (default is all interfaces)
 --port n                            - port to listen on (default 8080)
 --stop-port n                       - port to listen for stop command (or -DSTOP.PORT=n)
 --stop-key n                        - security string for stop command (required if --stop-port is present) (or -DSTOP.KEY=n)
 [--jar file]*n                      - each tuple specifies an extra jar to be added to the classloader
 [--lib dir]*n                       - each tuple specifies an extra directory of jars to be added to the classloader
 [--classes dir]*n                   - each tuple specifies an extra directory of classes to be added to the classloader
 --stats [unsecure|realm.properties] - enable stats gathering servlet context
 [--config file]*n                   - each tuple specifies the name of a jetty xml config file to apply (in the order defined)
Context opts:
 [[--path /path] context]*n          - WAR file, web app dir or context xml file, optionally with a context path

使用

java -jar jetty-runner.jar crm_web.war

效果

 

 

说明

如果需要运行多个war jetty-runner 是一个不错的工具,下边的链接有比较全的使用说明

参考资料

https://webtide.com/jetty-runner/
http://www.eclipse.org/jetty/documentation/current/runner.html

posted on   荣锋亮  阅读(1458)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-05-18 使用go-mysql-server 开发自己的mysql server
2018-05-18 ballerina 学习九 Client endpoints
2018-05-18 ballerina 学习八 Parallel( 并行处理)
2018-05-18 ballerina 学习七 object 创建&& 初始化
2018-05-18 ballerina 学习六 xml && json
2014-05-18 使用ZeroClipboard解决跨浏览器复制到剪贴板的问题
2014-05-18 Font Awesome

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示