前言
Hutool中提供了许多封装好的工具类,本人整理了下web项目中常用的一些工具类和方法,更多详细的用法直接点击跳转官方文档查阅。
1.IO流工具-IoUtil,FileUtil
readLines-按行读取close-关闭流
1 |
|
执行结果:
1 | 10:57:23.174 [main] INFO common.HutoolTest - test1.text 内容: [红豆生南国,, 春来发几枝。, 愿君多采撷,, 此物最相思。] |
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia-plus根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true