在 Java 中要将 String 类型转化为 int 类型时,可以使用 Integer 类中的 parseInt() 方法或者 valueOf() 方法进行转换。字符串中可能不是数字,所以在转换的时候需要处理异常。
方法1:
1 | String str = "100"; |
方法2:
1 | String str = "100"; |
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
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