Package com.xxl.tool.core
Class PropTool
java.lang.Object
com.xxl.tool.core.PropTool
properties tool
- Author:
- xuxueli 2015-6-22 22:36:46
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBoolean(Properties prop, String key) load int booleanstatic doublegetDouble(Properties prop, String key) load double valuestatic intgetInt(Properties prop, String key) load int valuestatic longgetLong(Properties prop, String key) load long valuestatic StringgetString(Properties prop, String key) load string valuestatic StringgetString(Properties prop, String key, String defaultValue) load string value with default valuestatic PropertiesloadFileProp(String fileName) load properties from file pathstatic Propertiesload properties from resource path
-
Constructor Details
-
PropTool
public PropTool()
-
-
Method Details
-
loadProp
load properties from resource path- Parameters:
resourcePath-- Returns:
-
loadFileProp
load properties from file path- Parameters:
fileName-- Returns:
-
getString
load string value- Parameters:
key-- Returns:
-
getString
load string value with default value- Parameters:
prop-key-defaultValue-- Returns:
-
getInt
load int value- Parameters:
key-- Returns:
-
getBoolean
load int boolean- Parameters:
prop-key-- Returns:
-
getLong
load long value- Parameters:
prop-key-- Returns:
-
getDouble
load double value- Parameters:
prop-key-- Returns:
-