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;
    }
posted @ 2012-11-11 23:05  程序员-初学者  阅读(471)  评论(0)    收藏  举报