• ant配置文件打包到class目录下


     

    package com.Socket.event;
    
    import java.util.MissingResourceException;
    import java.util.ResourceBundle;
    
    import com.Socket.util.LogUtil;
    
    public class FrequencyProperty {
    
        private static ResourceBundle resourceBundle;
    
        static {
            String bundleName = "frequency"; // frequency.properties
            try {
                resourceBundle = ResourceBundle.getBundle(bundleName);
            } catch (MissingResourceException mre) {
                LogUtil.error("resource bundle missing: " + bundleName);
            }
        }
    
        public static int getProperty(String key) {
    
            String value = "";
    
            try {
                value = resourceBundle.getString(key);
            } catch (Exception e) {
                return 30;
            }
    
            return Integer.parseInt(value);
        }
    
        
    }
  • 相关阅读:
    Vue自定义指令 directive
    Vue过滤器 filters
    贪心
    家庭作业
    线段
    数列极差
    shell
    智力大冲浪
    加工生产调度
    喷水装置
  • 原文地址:https://www.cnblogs.com/LcxSummer/p/14074252.html
Copyright © 2020-2023  润新知