java 读取Properties文件

来源:互联网 发布:手机怎么注册淘宝网店 编辑:程序博客网 时间:2024/05/01 10:04
public class WsdlConfig {
    
    public static Properties properties;
    
    static{
        
        properties = new Properties();
        
        InputStream in = WsdlConfig.class.getClassLoader().getResourceAsStream("wsdl-config.properties");
        try {
            properties.load(in);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    

}


==========================================================================================

String wsdl = WsdlConfig.properties.getProperty("algorithm.service").trim();



0 0
原创粉丝点击