'Loading Dropwziard AssetBundles dynamically?
Is there a way to get a dropwizard app to set up the AssetBundles based on the configuration file? Here is my situation:
I have a project setup with the following structure for my assets/static files
src -> main -> resources -> group1 -> assets
src -> main -> resources -> group2 -> assets
Is there a way during the bootstrap initialization to pull a piece of data from the config.yml and say bootstrap.addBundle(new AssetsBundle("{group}/assets/css", "/css"));
where {group} comes from the config.yml file (i.e. by changing a parameter in the config.yml, I can change which assets I load)? The issue I believe is that the initialize function is running prior to the actual loading of the configuration, and thus I don't have access to that information yet.
Most info on asset bundle manipulations that I've seen have been more about serving content from outside the jar, rather than loading specific assets during startup/runtime. I spent a little bit of time looking at the Dropwizard ConfigurableAssetBundle, but I'm still scratching my head on it.
Is this something that can be done with Dropwizard?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
