Context templateContext = Context.getCurrentThreadContext();
if (templateContext == null) {
templateContext = beanCtx.getBean(WebApplicationContext.class);
Context.setCurrentThreadContext(templateContext);
}
UrlMappingRuleHelper helper = new UrlMappingRuleHelper();
initUrlMappingRules(helper);
dispatcher.setRuleExtractor(new AntPathRuleExtractor());
dispatcher.setRuleList(helper.getArrangedRuleList());
logger.info("url mapping rules are initialized.");
}