Pen*_*nny 1 java escaping properties
嗨,我正在处理一些java .proeprties文件.
我想知道"\"在一行的末尾是什么意思,例如:
pay.checkPrint.shellfish=You need to be the target of feature. \
Features are setup. <a id="desclink" href="{0 }">Click here</a> to work.
Run Code Online (Sandbox Code Playgroud)
它是否与以下相同?
pay.checkPrint.shellfish=You need to be the target of feature. Features are setup. <a id="desclink" href="{0 }">Click here</a> to work.
Run Code Online (Sandbox Code Playgroud)
一分钱
这是逃避终结线角色的简单方法.
从Oracle ATG编程指南(我看到此链接也已在评论中链接):
如果每行以反斜杠('\')字符终止,则属性值可以跨越多行.例如:
Run Code Online (Sandbox Code Playgroud)targetCities=\ Detroit,\ Chicago,\ Los Angeles这相当于
targetCities=Detroit,Chicago,Los Angeles(忽略行开头的空格).
编辑:正如@erickson所建议的,我正在为答案添加权威规范 Properties