Flink读取resource资源文件


 public static ParameterTool getParameterTool(String[] args){
        try {
            return ParameterTool
                    .fromPropertiesFile(PropertiesUtil.class.getResourceAsStream("FilePath"))
                    .mergeWith(ParameterTool.fromArgs(args))
                    .mergeWith(ParameterTool.fromSystemProperties());
        }catch (IOException e){
            log.error("读取配置文件错误",e);
        }
       return ParameterTool.fromSystemProperties();
    }


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM