org.apache.velocity.app.Velocity.resourceExists()方法的使用及代码示例

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

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

Velocity.resourceExists介绍

[英]Determines whether a resource is accessable via the currently configured resource loaders. org.apache.velocity.runtime.resource.Resource is the generic description of templates, static content, etc.

Note that the current implementation will not change the state of the system in any real way - so this cannot be used to pre-load the resource cache, as the previous implementation did as a side-effect.
[中]确定资源是否可通过当前配置的资源加载程序访问。组织。阿帕奇。速度运行时。资源资源是对模板、静态内容等的一般描述。
请注意,当前的实现不会以任何实际方式更改系统的状态,因此这不能用于预加载资源缓存,因为之前的实现会产生副作用。

代码示例

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity

/**
 * @param resourceName Name of the Template to check.
 * @return True if the template exists.
 * @see #resourceExists(String)
 * @deprecated Use resourceExists(String) instead.
 */
public static boolean templateExists(String resourceName)
{
  return resourceExists(resourceName);
}

代码示例来源:origin: velocity/velocity-dep

/**
   * @see #resourceExists(String)
   * @deprecated Use resourceExists(String) instead.
   */
  public static boolean templateExists(String resourceName)
  {
    return resourceExists(resourceName);
  }
}

代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity

/**
   * @param resourceName Name of the Template to check.
   * @return True if the template exists.
   * @see #resourceExists(String)
   * @deprecated Use resourceExists(String) instead.
   */
  public static boolean templateExists(String resourceName)
  {
    return resourceExists(resourceName);
  }
}

代码示例来源:origin: apache/wicket

if (!Velocity.resourceExists(templateName))

代码示例来源:origin: org.apache.wicket/wicket-velocity

if (!Velocity.resourceExists(templateName))

相关文章