DropWizard可以从jar文件外部提供资产吗? [英] Can DropWizard serve assets from outside the jar file?

查看:127
本文介绍了DropWizard可以从jar文件外部提供资产吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在查看文档时,它似乎DropWizard仅能提供src/main/resources中的静态内容.我想将我的静态文件保存在jar文件之外的单独目录中.那可能吗?还是大多数人使用nginx/Apache作为静态内容?

In looking at the documentation, it appears that DropWizard is only able to serve static content living in src/main/resources. I'd like to keep my static files in a separate directory outside the jar file. Is that possible? Or do most people use nginx/Apache for their static content?

推荐答案

是的,可以使用此插件- https://github.com/bazaarvoice/dropwizard-configurable-assets-bundle

yes, it can, using this plugin - https://github.com/bazaarvoice/dropwizard-configurable-assets-bundle

这篇关于DropWizard可以从jar文件外部提供资产吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆