propermanagerutil.java
来自「这是中国移动的一个管理系统」· Java 代码 · 共 40 行
JAVA
40 行
/* * 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 + =
减小字号Ctrl + -
显示快捷键?