js读取properties文件件里面有没有换行符

温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(4318)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'java的properties文件中的换行书写',
blogAbstract:'我们经常在properties文件中设置属性的时候,如果某一个属性的值太长,那么查看就不太方便,但是又不能直接的换行,否则读取属性的值的时候其换行部分就被忽略了.其实我们可以通过增加一个\\符号来达到换行的效果.如下:
test.properties文件:name=Hello world \\My Name is ferreousbox
&&& 那么我们在读取name属性的时其值就变成了:Hello world My Name is ferreousbox.也就解决了在properties文件中换行书写的问题,只需要在每一行的最后增加一个\\符号,注意其下一行必须是接着的一行,即中间不能空行,否则也会被忽略的:-).',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:0,
publishTime:0,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:true,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}2047人阅读
Xml标签(1)
一.创建properties配置文件()
创建用file文本
二.写入配置文件内容(以键值对形式配置) 键不可换行,值换行要加“/”
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/mybatis
三.在xml中读取配置文件(例如web.xml)。
引入配置文件,使用${}读取信息
&!-- 引导db文件 --&
&strong& &span style=&color:#FF6666;&&&properties resource=&db.properties&/& &/span&&/strong&
&environments default=&development&&
&environment id=&development&&
&transactionManager type=&JDBC& /&
&!-- 配置数据库连接信息 --&
&dataSource type=&POOLED&&
&span style=&color:#FF0000;&&
&property name=&driver& value=&${driver}& /&
&property name=&url& value=&${url}& /&
&property name=&username& value=&${name}& /&&/span&
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:9845次
排名:千里之外
原创:22篇
(3)(4)(1)(2)(3)(1)(4)(3)(2)(1)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'本帖子已过去太久远了,不再提供回复功能。在 SegmentFault,解决技术问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。
一线的工程师、著名开源项目的作者们,都在这里:
获取验证码
已有账号?
标签:至少1个,最多5个
在安装的SciTE目录下,增加文件locale.properties。
将下面的代码保存为locale.properties放到SciTE目录 !
translation.encoding=GBK
# 在 GBK环境下, SciTEGlobal.properties 要作下列改
# 让倒退键运作正常
code.page=936
# File menu
File=文件(&F)
New=新建(&N)
Open=打开(&O)
Open Selected Filename=打开选择的文件名(&F)
Revert=恢复到刚储存后!!(&R)
Close=关闭(&C)
Save=保存(&S)
Save As=另存(&A)
Export=导出(&E)
As HTML=为 HTML (&H)
As RTF=为 RTF (&R)
Page Setup=页面设定(&U)
Print=打印(&P)
Load Session=载入文件列表(&L)
Save Session=保存当前打开文件为文件列表(&V)
Exit=退出(&X)
# Edit menu
Edit=编辑(&E)
Undo=撤销(&U)
Redo=重复上次动作(&R)
Cut=剪切(&T)
Copy=拷贝(&C)
Paste=粘贴(&P)
Delete=删除(&D)
Select All=全选(&A)
Copy as RTF=复制为RTF(&F)
Match Brace=跳至对应的括号(&B)
Select to Brace=选取所括内容(及括号)(&O)
Show Calltip=显示函数提示(&H)
Complete Symbol=补齐符号(&Y)
Complete Word=补齐文字(&W)
Expand Abbreviation=展开缩写(&E)
Block Comment or Uncomment=区块中各行首加注释号/取消(&M)
Box Comment=区块首尾且各行首加注释号(&X)
Stream Comment=区块首尾加注释号(&N)
Make Selection Uppercase=大写转换(&S)
Make Selection Lowercase=小写转换(&L)
# Search menu
Search=查找(&S)
Find=搜索(&F)
Find Next=查找下一个(&N)
Find Previous=查找上一个(&S)
Find in Files=在打开文件中寻找(&I)
Replace=替换(&E)
Go to=跳至(&G)
Next Bookmark=下一个书签(&M)
Previous Bookmark=上一个书签(&V)
Toggle Bookmark=设置/清除书签(&K)
Clear All Bookmarks=清除所有书签(&C)
# View menu
View=查看(&V)
Toggle current fold=折叠/开启本区段(&C)
Toggle all folds=折叠/开启所有区段(&A)
Full Screen=全屏(&N)
Tool Bar=工具条(&T)
Tab Bar=标签栏(&B)
Status Bar=状态栏(&S)
Whitespace=空白符(&W)
End of Line=换行符(&E)
Indentation Guides=缩排(&I)
Line Numbers=行号(&L)
Margin=行号及书签(&M)
Fold Margin=折叠状态列(&F)
Output=输出窗口(&O)
Parameters=参数(&P)
# Tools menu
Tools=工具(&T)
Compile=编译(&C)
Build=建立(&B)
Go=执行(&G)
Stop Executing=停止执行(&S)
Next Message=下一个消息(&N)
Previous Message=上一个消息(&P)
Clear Output=清除输出(&O)
Switch Pane=切换视窗(&S)
# Options menu
Options=选项(&O)
Always On Top=总是在顶层(&A)
Vertical Split=两窗垂直并列(&S)
Line End Characters=规定换行号(&L)
CR + LF=CR + LF(&+)
Convert Line End Characters=依规定转换现有换行号(&C)
Change Indentation Settings=改变缩排设定(&T)
Use Monospaced Font=使用等宽字型(&M)
Open Local Options File=开启 Local Options 档(&O)
Open User Options File=开启 User Options 档(&U)
Open Global Options File=开启 Global Options 档(&G)
Open Abbreviations File=开启 Abbreviations 档(&B)
# Language menu
Language=语言(&L)
# Buffers menu
Buffers=缓冲区(&B)
Previous=上一档(&P)
Next=下一档(&N)
Close all=关闭全部档案(&C)
# Help menu
Help=说明(&H)
About Sc1=关于 Sc1(&S)
About SciTE=关于 SciTE(&A)
# Generic dialog
Cancel=取消
# About dialog
# About SciTE=
# This is to add something like: Swahili translation 1.41.1 by Neil Hodgson
TranslationCredit= v1.56 Daniel Lin (林原志)
v1.57-1.66
龚维正 revised. v1.66
高显华 简体化并修正
Contributors:=贡献者:
# Open, Save dialogs
Open File=打开
Save File=保存
Save File As=另存为
Export File As HTML=导出为 HTML
Export File As RTF=导出为 RTF
Save Current Session=储存当前打开文件为文件列表
Custom Filter=自定义文件类型
# Find in Files dialog
#Find in Files=在众档中寻找
Find what:=搜索字符(&N)
Files:=文件(&I)
# Go To dialog
Go To=跳至(&G)
Destination Line Number:=目地行号(&D)
Current line:=当前行号
Last line:=前一次行号
# Indentation Settings dialog
Indentation Settings=缩排设定
Tab Size:=Tab 的宽度(&T)
Indent Size:=缩排宽度(&I)
Use tabs:=使用 Tab(&U)
# Replace and Find dialogs
Replace=替换(&R)
Find what:=搜索字符(&N)
Replace with:=替换为(&P)
Match whole word only=全字符匹配(&W)
Match case=区分大小写(&C)
Regular expression=使用正则表达式(reg. exp.)(&E)
Wrap around=循环查找(&O)
Transform backslash expressions=使用反斜线(&B)
Find Next=查找下一个(&F)
Replace All=全部替换(&A)
Replace in Selection=在选取文字中替换(&S)
Direction=查找方向
Reverse direction=反向查找
# Parameters dialog
Execute=执行
Set=设置(&S)
# Other UI strings
Untitled=未命名
# Properties used in global options
Text=普通文本
All Source=源代码
All Files (*.*)=所有文件 (*.*)
# Messages
# Messages may contain variables such as file names or search strings indicated
# by ^0 which are replaced by values before display. ^1, ^2, ... may be used in the future.
Can not find the string '^0'.=找不到 '^0'。
Find string must not be empty for 'Replace All' command.='全部替换'时查找内容不能空白。
Selection must not be empty for 'Replace in Selection' command.='在选取文字中替换'时一定要先选取文字
No replacements because string '^0' was not present.=没有找到替换字符 '^0'。
Could not open file '^0'.=无法打开 '^0'。
Could not save file '^0'.=无法保存 '^0'。
Save changes to '^0'?=文件已发生更改,是否要保存为 '^0'?
Save changes to (Untitled)?=文件已发生更改,文件保存为 '未命名'?
The file '^0' has been modified. Should it be reloaded?=文件 '^0'已修改过,是否重新载入?
Bad file.=损坏文件。
Failed to create dialog box: ^0.=无法开启 ^0 对话框。
Can not start printer document.=无法打印。
URI '^0' not understood.=不能解析 '^0' URI。
Invalid directory '^0'.=无效的目录/文件夹 '^0'。
Directory:=目录(&D)
Wrap=自动换行(&W)
Hide=隐藏(&H)
Check if already open=检查文件是否已打开(&H)
Find string must not be empty for 'Replace in Selection' command.='在选取文字中替换'时查找内容不能空。
List Macros=列出所有宏
Run Current Macro=执行目前的宏
Record Macro=录制巨集
Stop Recording Macro=停止录制巨集
SciTE Help=SciTE 说明(&S)
Sc1 Help=Sc1 说明
Edit Properties=编辑选项
Wrap Output=输出时自动换行(&P)
Read-Only=只读(&R)
As TeX=为 TeX
Export File As TeX=导出为 Tex
Save a Copy=保存备份(&P)
As LaTeX=为 LaTeX (&L)
Export File As LaTeX=导出为 TeX
Encoding=编码
UCS-2 Big Endian=
UCS-2 Little Endian=
Save All=全部保存(&S)
Browse=浏览(&B)
Select a folder to search from=选择要查找的目录/文件夹
UTF-8 Cookie=
Insert Abbreviation=插入缩写(&I)
Abbreviation:=缩写:
Insert=插入
Mark All=找齐后全部选择(&M)
In Selection=在选定区域
Paragraph=段落(&G)
Join=合并(&J)
Split=分割(&S)
Block comment variable '^0' is not defined in SciTE *.properties!=于区块中行首的注释符号 '^0' 没有在 SciTE *.properties 中定义!
Box comment variables '^0', '^1' and '^2' are not defined in SciTE *.properties!=于区块首尾和其中各行首的注释符号 '^0' 、 '^1' 、 '^2' 没有在 SciTE *.properties 中定义!
Stream comment variables '^0' and '^1' are not defined in SciTE *.properties!=于区块首尾的注释符号 '^0' 及 '^1' 没有在 SciTE *.properties 中定义!
The file '^0' has been modified outside SciTE. Should it be reloaded?=文件 '^0' 已经在 SciTE 之外修改过, 是否要重新载入?
As PDF=为 PDF (&P)
Export File As PDF=导出为 PDF
Version=版本
Incremental Search=同步输入查找(&L)
Search for:=同步输入查找
Could not save file '^0'. Save under a different name?=无法保存 '^0' 文件,是否更名另存?
As XML=为 XML (&X)
Export File As XML=导出为 XML
Destination Line:=目的行(&D)
Column:=目的栏(&C)
Replacements:=替换:
Open Files Here=在此打开文件(&H)
File '^0' is ^1 bytes long,/nlarger than the ^2 bytes limit set in the properties./nDo you still want to open it?=文件 '^0' 的长度为 ^1 bytes,/n比设定在 properties 档中的/n ^2 bytes 还长,你仍然要打开/n吗?
Open Lua Startup Script=开启 Lua Startup Script
All Files (*)=所有文件(*)
Hidden Files (.*)=隐藏文件(.*)
Show hidden files=显示隐藏文件
Replace in Buffers=在缓冲区中替换(&U)
Find string must not be empty for 'Replace in Buffers' command.='在缓冲区中替换'时查找内容不能为空。
Search only in this style:=仅以此样式查找:
0 收藏&&|&&1
你可能感兴趣的文章
分享到微博?
我要该,理由是:

我要回帖

更多关于 properties文件 的文章

 

随机推荐