Skip to content

Instantly share code, notes, and snippets.

@mylesjao
Last active August 29, 2015 14:11
Show Gist options
  • Save mylesjao/ab3f8d173f752b55c9db to your computer and use it in GitHub Desktop.
Save mylesjao/ab3f8d173f752b55c9db to your computer and use it in GitHub Desktop.
enable spring matrix variable support
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
// enable matrix variable support
if (configurer.getUrlPathHelper() == null) {
UrlPathHelper urlPathHelper = new UrlPathHelper();
urlPathHelper.setRemoveSemicolonContent(false);
configurer.setUrlPathHelper(urlPathHelper);
} else {
configurer.getUrlPathHelper().setRemoveSemicolonContent(false);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment