public class PropertiesUtil extends Object
| Constructor and Description |
|---|
PropertiesUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
getBoolean(Properties p,
String name,
Boolean defaultValue) |
static Double |
getDouble(Properties p,
String name,
Double defaultValue) |
static Integer |
getInt(Properties p,
String name,
Integer defaultValue) |
static Long |
getLong(Properties p,
String name,
Long defaultValue) |
static String |
getString(Properties p,
String name,
String defaultValue) |
static Properties |
loadFromFile(String generalPath)
从文件路径加载properties.
|
static Properties |
loadFromString(String content)
从字符串内容加载Properties
|
public static Boolean getBoolean(Properties p, String name, Boolean defaultValue)
public static Integer getInt(Properties p, String name, Integer defaultValue)
public static Long getLong(Properties p, String name, Long defaultValue)
public static Double getDouble(Properties p, String name, Double defaultValue)
public static String getString(Properties p, String name, String defaultValue)
public static Properties loadFromFile(String generalPath)
public static Properties loadFromString(String content)
Copyright © 2018. All rights reserved.