![](/img/trans.png)
[英]Request log in console for Jetty container using xsbt-web-plugin
[英]How to specify a jetty.xml config file for xsbt-web-plugin
我有一个使用xsbt-web-plugin的项目,但我希望能够自定义码头设置。 有没有办法可以指定自己的jetty.xml文件? 我找到了
PluginKeys.configurationFiles
设置并将其设置为所需的文件,但没有效果
您可以使用jetty()
的config
参数指定jetty.xml配置文件:
jetty(config = "etc/jetty.xml")
如果需要指定多个配置文件,则可以将它们作为单独的--config
参数传递:
jetty(args = Seq
"--config", "jetty.xml"
, "--config", "jetty-https.xml"
, "--config", "jetty-ssl.xml"
))
查看文档以获取更多信息。
我目前使用的是xsbt-web-plugin 2.0.2(最新版本)。您可以在build.sbt中进行如下操作:
enablePlugins(JettyPlugin)
containerConfigFile in Compile := Some(file("./src/main/webapp/WEB-INF/jetty-env.xml"))
我希望它对你有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.