import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import org.apache.commons.io.IOUtils; try { InputStream stream = getClass().getClassLoader().getResourceAsStream("a.html"); return IOUtils.toString(stream, StandardCharsets.UTF_8); } catch (IOException e) { return e.toString(); }
use resource file in jar
猜你喜欢
转载自www.cnblogs.com/tonggc1668/p/12665876.html
今日推荐
周排行