wro4j - build all groups using runtime solution

久未见 提交于 2019-12-23 19:47:05

问题


I'm using wro4j with a maven + spring-mvc based web application. I have two different wro.properties file to configure the web app differently when in development mode vs deployment mode. wro4j is configured to run using the runtime solution. The setup is working fine so far.

What I want to be able to do now is that in deployment mode, all the wro4j groups should be built immediately on server start up (as opposed to on-first-request per wro resource). I haven't found a configuration option for this - is there one? If not, how can I go about making this happen?

(I know I can probably get similar result using compile mode for deployment, but given that I already have runtime mode set up I am wondering if I can piggy back on that)


回答1:


A possible solution is to create a custom requestHandler which would iterate through all the groups and would trigger processing. You would have to invoke that request handler during application startup.

If you would like to have this feature out of the box, feel free to open an issue.



来源:https://stackoverflow.com/questions/24583490/wro4j-build-all-groups-using-runtime-solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!