📄 propermanagerutil.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.mobile.util;//专门用来处理属性文件//加载,,取出数据;;import java.io.IOException;import java.util.Properties;/** * * @author st */public class ProperManagerUtil { private static Properties pro = new Properties(); static { try { pro.load(ProperManagerUtil.class.getClassLoader().getResourceAsStream("com/mobile/resource/application.properties")); } catch (IOException e) { e.printStackTrace(); } }public static String getValue(String key){ return pro.getProperty(key);}public static void main(String[] args){ System.out.println(getValue("url"));}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -