package com.usky.config; import java.io.IOException; import java.util.Properties; /** * @author Symer * @date 2019/11/26 */ public class FileConfig { /** 大华配置 */ /* public static String dahuaIp ="60.191.94.122"; public static Integer dahuaPort=9332; public static String dahuaUsername="8900yanshi"; public static String dahuaPassword="8900yanshi1";*/ /*演示平台:60.191.94.122 端口:9332 用户名:8900yanshi 密码:8900yanshi1*/ /** 大华配置 */ public static String dahuaIp; public static Integer dahuaPort; public static String dahuaUsername; public static String dahuaPassword; static { Properties props = new Properties(); try { props.load(ClassLoader.getSystemResourceAsStream("dh.properties")); dahuaIp = props.getProperty("dh.dahuaIp"); dahuaPort = Integer.valueOf(props.getProperty("dh.dahuaPort")); dahuaUsername = props.getProperty("dh.dahuaUsername"); dahuaPassword = props.getProperty("dh.dahuaPassword"); } catch (IOException e) { e.printStackTrace(); } } }