Package net.risesoft.util
Class PropertiesUtil
- java.lang.Object
-
- net.risesoft.util.PropertiesUtil
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class PropertiesUtil extends Object implements org.springframework.beans.factory.InitializingBean
- Author:
- qinman, zhangchongjie
- Date:
- 2022/12/20
-
-
Constructor Summary
Constructors Constructor Description PropertiesUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Sets the system propertiesMap<String,String>getAllProperties(String resourceUrl, List<String> list)Description: 获取properties文件中的所有内容List<String>getKeys(String resourceUrl)Description: 获取关键字PropertiesgetProperties(String resourceUrl)Description: 获取Properties文件StringgetProperty(String resourceUrl, String source)Description: 获取资源voidsave(String resourceUrl, Properties prop)Description: 保存voidsavePropertiy(String resourceUrl, String key, String value)Description: 设置修改后的properties的属性voidsetSystemProperties(Map systemProperties)
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws ExceptionSets the system properties- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getAllProperties
public Map<String,String> getAllProperties(String resourceUrl, List<String> list)
Description: 获取properties文件中的所有内容- Parameters:
resourceUrl-list-- Returns:
-
getKeys
public List<String> getKeys(String resourceUrl)
Description: 获取关键字- Parameters:
resourceUrl-- Returns:
-
getProperties
public Properties getProperties(String resourceUrl)
Description: 获取Properties文件- Parameters:
resourceUrl-- Returns:
-
getProperty
public String getProperty(String resourceUrl, String source)
Description: 获取资源- Parameters:
resourceUrl-source-- Returns:
-
save
public void save(String resourceUrl, Properties prop)
Description: 保存- Parameters:
resourceUrl-prop-
-
savePropertiy
public void savePropertiy(String resourceUrl, String key, String value)
Description: 设置修改后的properties的属性- Parameters:
resourceUrl-key-value-
-
setSystemProperties
public void setSystemProperties(Map systemProperties)
-
-