⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.java

📁 采用JAVA开发
💻 JAVA
字号:
package com.gctech.sms.sp.dwzb;
import java.util.*;
import java.io.*;
/**
 * 动物占卜系统配置
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: gctech</p>
 * @author lijz@gctech.com.cn
 * @version 1.0
 */
public class Config
{
  private static Config cfg = new Config();
  Properties p =null;
  private Config()
  {
    try
    {
      p = new Properties();
      FileInputStream fi = new FileInputStream(System.getProperty("user.dir")+File.separator+"smsconfig.properties");
      p.load(fi);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }

  }

  public static Config instance()
  {
    return cfg;
  }

  public String getPlatformIP()
  {
    return p.getProperty("PlatformIP");
  }

  public int getPlatformPort()
  {
    return Integer.parseInt(p.getProperty("PlatformPort")) ;
  }

  public String getSpId()
  {
    return p.getProperty("SpId");
  }

  public String getSecret()
  {
    return p.getProperty("Secret");
  }

//  public String getServiceNo()
//  {
//    return p.getProperty("ServiceNo");
//  }

  public String getFreeFeeServiceId()
  {
    return p.getProperty("FreeFeeServiceId");
  }

  public String getCheapFeeServiceId()
  {
    return p.getProperty("CheapFeeServiceId");
  }

  public String getExpensiveFeeServiceId()
  {
    return p.getProperty("ExpensiveFeeServiceId");
  }
  public int getSessionMax()
  {
    return Integer.parseInt(p.getProperty("SessionMax","100"));
  }

  public int getTTL()
  {
    return Integer.parseInt(p.getProperty("TTL","2"));
  }




  public static void main(String[] args)
  {
    Config config1 = new Config();
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -