加载apache的工具类
<dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> import org.apache.commons.lang.StringUtils; if (!StringUtils.isEmpty(kylinConfHome)) { logger.info("Use KYLIN_CONF=" + kylinConfHome); return getKylinPropertiesFile(kylinConfHome); }
关闭流操作
<dependency> <groupId>commons-io</groupId> <artifac tId>commons-io</artifactId> <version>2.4</version> </dependency> FileInputStream fis = new FileInputStream(propFile); finally { IOUtils.closeQuietly(fis); }
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/11177.html