org.apache.tiles.request.ApplicationContext.getInitParams()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.apache.tiles.request.ApplicationContext.getInitParams()方法的一些代码示例,展示了ApplicationContext.getInitParams()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationContext.getInitParams()方法的具体详情如下:
包路径:org.apache.tiles.request.ApplicationContext
类名称:ApplicationContext
方法名:getInitParams

ApplicationContext.getInitParams介绍

[英]Return an immutable Map that maps context application initialization parameters to their values.
[中]返回将上下文应用程序初始化参数映射到其值的不可变映射。

代码示例

代码示例来源:origin: org.apache.tiles/tiles-request-api

/** {@inheritDoc} */
public Map<String, String> getInitParams() {
  return context.getInitParams();
}

代码示例来源:origin: org.apache.struts/struts2-tiles-plugin

@Override
protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
  Collection<ApplicationResource> resources = new ArrayList<>();
  Set<String> definitions = getTilesDefinitions(applicationContext.getInitParams());
  for (String definition : definitions) {
    resources.addAll(applicationContext.getResources(definition));
  }
  if (resources.contains(null)) {
    LOG.warn("Some resources were not found. Definitions: {}. Found resources: {}", definitions, resources);
  }
  List<ApplicationResource> filteredResources = new ArrayList<>();
  for (ApplicationResource resource : resources) {
    if (resource != null && Locale.ROOT.equals(resource.getLocale())) {
      filteredResources.add(resource);
    }
  }
  return filteredResources;
}

代码示例来源:origin: pl.edu.icm.synat/synat-ui-commons

super.registerAttributeRenderers(rendererFactory, applicationContext, container, attributeEvaluatorFactory);
Map<String, String> parameters = new HashMap<>();
parameters.putAll(applicationContext.getInitParams());
parameters.putAll(getFreemarkerServletInitParameters(applicationContext));
parameters.put("NoCache", "true");

相关文章