InputStream in = this.getClass().getResourceAsStream("/xxx.txt"); 读成inputStream后,用这个文章里的方法转成String或者其它的:点击打开链接