Properties读取配置文件
2016-04-25 17:28
477 查看
static Properties webProper = new Properties(); static InputStream is; public sendTelMsg(){ //从配置文件中获取默认域名 if (is==null) { is=sendTelMsg.class.getClass().getResourceAsStream("/配置文件名称.properties"); try { webProper.load(is); webProper.getProperty("msgSDUser"); webProper.getProperty("msgSDKey"); webProper.getProperty("DYKey"); webProper.getProperty("DYSecret"); webProper.getProperty("DYSign"); System.err.println("=====This SMS===="); } catch (IOException e) { System.out.println(e); } } }
相关文章推荐
- nginx+memcahed+tomcat实现session的资源共享
- 原创docker dcos 的安装
- linux服务端并发优化
- linux下安装yii
- runloop视频
- linux文件系统问题:wrong fs type, bad option, bad superblock
- Linux 定时任务
- Linux 定时任务
- Linux Ethernet Over Usb
- Linux配置查询
- linux上内存泄漏查看方法之——让系统调用自己定义的new
- linux驱动路径
- shell命令获取tomcat的进程号id
- 【AudioProfile】情景模式下音效的默认设置
- linux下Bash函数功能之编写脚本(十一)
- CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory
- CentOS下更新python版本
- Java调用shell
- 微服务的性能模式
- nginx的SSL配置模板