config.getServletContext().setAttribute(Loading.CONTEXT_NAME, context);
}
private UrlMapping createUrlMapping(NutConfig config) throws Exception {
UrlMappingBy umb = config.getMainModule().getAnnotation(UrlMappingBy.class);
if (umb != null) {
String value = umb.value();
if ((!Strings.isBlank(value)) && value.startsWith("ioc:"))
return config.getIoc().get(UrlMapping.class, value.substring(4));
else
return (UrlMapping) Mirror.me(Lang.loadClass(umb.value())).born();
}
return new UrlMappingImpl();
}