类 BeetlUtil
java.lang.Object
org.beetl.core.misc.BeetlUtil
Beetl使用方法
- 作者:
- xiandafu
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidautoFileFunctionRegister(GroupTemplate gt, File funtionRoot, String ns, String path, String functionSuffix) static booleancheckNameing(String str) check 命名合法性static int[]getLog()static StringgetParameterDescription(Class[] types) static StringgetRelPath(String siblings, String resourceId) 相对路径计算static String返回Web根路径,如果存在自定义webroot路径,则返回自定义webrootstatic WritergetWriterByByteWriter(ByteWriter byteWriter) static booleanisOutsideOfRoot(String child) 判断一个路径是否指到外部了,比如../..static String出现中文字符时,提示对应的英文字符static voidsetWebroot(String webroot) 自定义WebRoot路径static RuntimeException
-
字段详细资料
-
webroot
-
-
构造器详细资料
-
BeetlUtil
public BeetlUtil()
-
-
方法详细资料
-
isOutsideOfRoot
判断一个路径是否指到外部了,比如../../test.txt就指到外部 -
getRelPath
相对路径计算- 参数:
siblings- 当前路径resourceId- 相对路径- 返回:
- 绝对路径
-
getWriterByByteWriter
-
setWebroot
自定义WebRoot路径 -
getWebRoot
返回Web根路径,如果存在自定义webroot路径,则返回自定义webroot -
checkNameing
check 命名合法性- 参数:
str- 需要check的字符串
-
getLog
public static int[] getLog() -
reportChineseTokenError
出现中文字符时,提示对应的英文字符- 参数:
msg- 可能是中文的字符串- 返回:
- 如果不是当前知道的中文字符,返回原来的字符串,否则提示出对应的英文字符
-
throwCastException
-
autoFileFunctionRegister
public static void autoFileFunctionRegister(GroupTemplate gt, File funtionRoot, String ns, String path, String functionSuffix) -
getParameterDescription
-