Skip to content

Instantly share code, notes, and snippets.

@aweigold
Last active August 29, 2015 14:06
Show Gist options
  • Save aweigold/c2fd6e923f753e4328b0 to your computer and use it in GitHub Desktop.
Save aweigold/c2fd6e923f753e4328b0 to your computer and use it in GitHub Desktop.
Adding grunt based javascript projects into Spring application in development
@Configuration
@Profile("dev")
public class DevWebResourceAdapter extends WebMvcConfigurerAdapter {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("file:./submodule-web/app/");
registry.addResourceHandler("/bower_components/**")
.addResourceLocations("file:./submodule-web/bower_components/");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment