com.jfinal.template.Engine.buildTemplateBySource()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(98)

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

Engine.buildTemplateBySource介绍

暂无

代码示例

代码示例来源:origin: jfinal/jfinal

/**
 * Get template by implementation of ISource
 */
public Template getTemplate(ISource source) {
  String cacheKey = source.getCacheKey();
  if (cacheKey == null) {	// cacheKey 为 null 则不缓存,详见 ISource.getCacheKey() 注释
    return buildTemplateBySource(source);
  }
  
  Template template = templateCache.get(cacheKey);
  if (template == null) {
    template = buildTemplateBySource(source);
    templateCache.put(cacheKey, template);
  } else if (devMode) {
    if (template.isModified()) {
      template = buildTemplateBySource(source);
      templateCache.put(cacheKey, template);
    }
  }
  return template;
}

代码示例来源:origin: jfinal/jfinal

return buildTemplateBySource(new StringSource(content, cache));
Template template = templateCache.get(cacheKey);
if (template == null) {
  template = buildTemplateBySource(new StringSource(content, cache));
  templateCache.put(cacheKey, template);
} else if (devMode) {
  if (template.isModified()) {
    template = buildTemplateBySource(new StringSource(content, cache));
    templateCache.put(cacheKey, template);

代码示例来源:origin: com.jfinal/jfinal

/**
 * Get template by implementation of ISource
 */
public Template getTemplate(ISource source) {
  String cacheKey = source.getCacheKey();
  if (cacheKey == null) {	// cacheKey 为 null 则不缓存,详见 ISource.getCacheKey() 注释
    return buildTemplateBySource(source);
  }
  
  Template template = templateCache.get(cacheKey);
  if (template == null) {
    template = buildTemplateBySource(source);
    templateCache.put(cacheKey, template);
  } else if (devMode) {
    if (template.isModified()) {
      template = buildTemplateBySource(source);
      templateCache.put(cacheKey, template);
    }
  }
  return template;
}

代码示例来源:origin: com.jfinal/enjoy

/**
 * Get template by implementation of ISource
 */
public Template getTemplate(ISource source) {
  String cacheKey = source.getCacheKey();
  if (cacheKey == null) {	// cacheKey 为 null 则不缓存,详见 ISource.getCacheKey() 注释
    return buildTemplateBySource(source);
  }
  
  Template template = templateCache.get(cacheKey);
  if (template == null) {
    template = buildTemplateBySource(source);
    templateCache.put(cacheKey, template);
  } else if (devMode) {
    if (template.isModified()) {
      template = buildTemplateBySource(source);
      templateCache.put(cacheKey, template);
    }
  }
  return template;
}

代码示例来源:origin: com.jfinal/enjoy

return buildTemplateBySource(new StringSource(content, cache));
Template template = templateCache.get(cacheKey);
if (template == null) {
  template = buildTemplateBySource(new StringSource(content, cache));
  templateCache.put(cacheKey, template);
} else if (devMode) {
  if (template.isModified()) {
    template = buildTemplateBySource(new StringSource(content, cache));
    templateCache.put(cacheKey, template);

代码示例来源:origin: com.jfinal/jfinal

return buildTemplateBySource(new StringSource(content, cache));
Template template = templateCache.get(cacheKey);
if (template == null) {
  template = buildTemplateBySource(new StringSource(content, cache));
  templateCache.put(cacheKey, template);
} else if (devMode) {
  if (template.isModified()) {
    template = buildTemplateBySource(new StringSource(content, cache));
    templateCache.put(cacheKey, template);

相关文章