java读取WEB-INF或src目录下的properties配置文件

上传者: fzw466452006 | 上传时间: 2023-12-17 07:05:12 | 文件大小: 12KB | 文件类型: ZIP
大家都喜欢把配置文件放在src目录下,如果有10个以上的配置文件为什么不考虑在WEB-INF目录下新建一个文件夹,专门放配置文件;这样即好管理,文件安全性又高。亲问题已经解决,把源代码共享给大家,已经通过测试;并且每行代码都有注释。只需传入key值就能得到value值。该程序是你不错的选择,希望能够帮助到你!

文件下载

资源详情

[{"title":"( 18 个子文件 12KB ) java读取WEB-INF或src目录下的properties配置文件","children":[{"title":"MyProperties","children":[{"title":".settings","children":[{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 252B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 474B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 500B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 395B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"config","children":[{"title":"PropertiesServlet.java <span style='color:#111;'> 909B </span>","children":null,"spread":false},{"title":"AppConfig.java <span style='color:#111;'> 2.65KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"WebRoot","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 36B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"config","children":[{"title":"config.properties <span style='color:#111;'> 36B </span>","children":null,"spread":false}],"spread":true},{"title":"web.xml <span style='color:#111;'> 692B </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"config","children":[{"title":"PropertiesServlet.class <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"AppConfig.class <span style='color:#111;'> 3.38KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"lib","children":null,"spread":false}],"spread":true},{"title":"look.jsp <span style='color:#111;'> 241B </span>","children":null,"spread":false},{"title":"index.jsp <span style='color:#111;'> 278B </span>","children":null,"spread":false}],"spread":true},{"title":".mymetadata <span style='color:#111;'> 309B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 529B </span>","children":null,"spread":false},{"title":".myeclipse","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明