本文介绍了如何在Play Framework 2.1中使用wro4j的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有一种方法可以包含wro4j http://code.google.com/p/wro4j/在java播放框架2.1?
我需要编译hogan.js模板并做更多工作无需重新设计路线.
也许我应该使用拦截器(@ Before,@ After,@ Finally)并创建一个扩展Application的类?


there is a way to include wro4j http://code.google.com/p/wro4j/in java play framework 2.1?
i need to compile hogan.js templates and do much more without reinvent the route.
maybe i should use interceptors (@Before, @After, @Finally) and creating a class that extend Application?

致谢

推荐答案

wro4j在构建时或运行时处理资源.

wro4j process resources either at build time or at runtime.

我还不知道任何Play2集成/插件/示例.

I'm not aware of any Play2 integration/plugin/sample yet.

您可以在此处使用wro4j SBT插件: https://github.com/BowlingX /xsbt-wro4j-plugin/

You can use the wro4j SBT plugin available here: https://github.com/BowlingX/xsbt-wro4j-plugin/

或者您可以编写一个wro4j控制器,以DEV模式即时处理资源并以PROD模式缓存它们.

Or you could write a wro4j controller that process resources on the fly in DEV mode and cache them in PROD mode.

这篇关于如何在Play Framework 2.1中使用wro4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 14:10