play framework 读取文件 程序员

    public static List<String> readList() {
        try {
            File file = new File(new File(new File(Play.applicationPath, "conf"), "init"), "aliww.txt");
            return FileUtils.readLines(file);
        } catch (IOException e2) {
            log.warn(e2.getMessage(), e2);
        }
        return ListUtils.EMPTY_LIST;
    }
原文地址:https://www.cnblogs.com/sallon/p/2765599.html