类 PropertiesUtil

  • 所有已实现的接口:
    org.springframework.beans.factory.InitializingBean

    public class PropertiesUtil
    extends Object
    implements org.springframework.beans.factory.InitializingBean
    作者:
    qinman, zhangchongjie
    Date:
    2022/12/20
    • 构造器详细资料

      • PropertiesUtil

        public PropertiesUtil()
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Sets the system properties
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        Exception
      • getAllProperties

        public Map<String,​String> getAllProperties​(String resourceUrl,
                                                         List<String> list)
        Description: 获取properties文件中的所有内容
        参数:
        resourceUrl -
        list -
        返回:
      • getKeys

        public List<String> getKeys​(String resourceUrl)
        Description: 获取关键字
        参数:
        resourceUrl -
        返回:
      • getProperties

        public Properties getProperties​(String resourceUrl)
        Description: 获取Properties文件
        参数:
        resourceUrl -
        返回:
      • getProperty

        public String getProperty​(String resourceUrl,
                                  String source)
        Description: 获取资源
        参数:
        resourceUrl -
        source -
        返回:
      • save

        public void save​(String resourceUrl,
                         Properties prop)
        Description: 保存
        参数:
        resourceUrl -
        prop -
      • savePropertiy

        public void savePropertiy​(String resourceUrl,
                                  String key,
                                  String value)
        Description: 设置修改后的properties的属性
        参数:
        resourceUrl -
        key -
        value -
      • setSystemProperties

        public void setSystemProperties​(Map systemProperties)