Java Properties類加載配置文件轉義問題

場景: 配置文件config.properties 配置項cfg.regexp=\d+\t 加載配置文件代碼 InputStream ins = PropManager.class.getResourceAsStream("/config.properties"); prop.load(ins); 現象: 打印cfg.regexp的值輸出爲"d+ ",而不是指望的"\d+\t" 緣由: 看了下代碼
相關文章
相關標籤/搜索