【发布时间】:2011-03-04 19:38:55
【问题描述】:
有人知道为什么我存储属性文件时冒号会被转义吗?
我正在这样做:
Properties prop = new Properties();
// Set the properties value.
prop.setProperty("url","http://localhost:7101/test/home");
和存储使用:
prop.store(new FileOutputStream(propFile), null);
它正在工作,但由于某种原因输出冒号转义:
url=http\://localhost\:7101/test/home
有人知道解决办法吗?
【问题讨论】:
标签: java properties