public class ResourceHelper
extends java.lang.Object
构造器和说明 |
---|
ResourceHelper() |
限定符和类型 | 方法和说明 |
---|---|
static void |
clearAllJsCache()
清除localMap缓存
|
static void |
clearDefaultJsCache()
清除embresource.DEFAULT_JS_MAP与noReplaceJS
|
static void |
clearLocaleJsCache()
清除embresource.DEFAULT_JS_MAP与noReplaceJS
|
static java.lang.String |
createDefaultCss()
生成默认的css
|
static java.lang.String |
createDefaultJs(java.util.Locale locale)
生成默认的js
|
static java.io.PrintWriter |
createJSWriter(javax.servlet.http.HttpServletResponse res) |
static void |
dealWithEmbResource(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
处理内置资源,js和css
|
static java.lang.String |
fetchI18NJs(java.util.Locale locale) |
static java.lang.String |
forceInitJSCache(java.lang.String resource)
方便启动的时候加载js到内存,加快第一次页面打开速度
|
static java.lang.String |
forceInitStyleCache(java.lang.String resource)
方便启动的时候加载css到内存,加快第一次页面打开速度
|
static long |
getCssVersion() |
static long |
getJsVersion() |
static void |
writeJS(javax.servlet.http.HttpServletResponse res,
java.lang.String js) |
public static void clearAllJsCache()
public static long getJsVersion()
public static long getCssVersion()
public static void clearLocaleJsCache()
public static void clearDefaultJsCache()
public static java.lang.String fetchI18NJs(java.util.Locale locale) throws java.lang.Exception
java.lang.Exception
public static void dealWithEmbResource(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.lang.Exception
req
- 请求res
- 响应java.lang.Exception
- 抛出异常public static java.lang.String forceInitJSCache(java.lang.String resource) throws java.lang.Exception
resource
- java.lang.Exception
public static java.lang.String forceInitStyleCache(java.lang.String resource)
resource
- public static void writeJS(javax.servlet.http.HttpServletResponse res, java.lang.String js) throws java.io.IOException
java.io.IOException
public static java.io.PrintWriter createJSWriter(javax.servlet.http.HttpServletResponse res) throws java.io.IOException
java.io.IOException
public static java.lang.String createDefaultJs(java.util.Locale locale) throws java.lang.Exception
locale
- 区域java.lang.Exception
- 抛出异常public static java.lang.String createDefaultCss() throws java.lang.Exception
java.lang.Exception
- 抛出异常