0%

  1. 在文章中使用< !–more–> 手动进行截断
  2. 在文章中的front-matter中添加description,并提供文章摘录
    这种方式只会在首页列表中显示文章的摘要内容,进入文章详情后不会再显示。
  3. 自动形成摘要,在主题配置文件中添加
    默认截取的长度为 150 字符,可以根据需要自行设定
    1
    2
    3
    auto_excerpt:
    enable: true
    length: 150

springboot实战整合

1.自定义配置文件

1.新建配置类Audience

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package cn.xmp.generator.demo.user.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
<!-- more -->
/**
*

*

*
* @author xiemopeng
* @since 2019/2/15
*/

@Data
@ConfigurationProperties(prefix = "audience")
public class Audience {
private String clientId;
private String base64Secret;
private String name;
private int expiresSecond;
}

2.yaml文件添加配置信息

1
2
3
4
5
audience:
clientId: 098f6bcd4621d373cade4e832627b4f6
base64Secret: MDk4ZjZiY2Q0NjIxZDM3M2NhZGU0ZTgzMjYyN2I0ZjY=
name: restapiuser
expiresSecond: 172800
阅读全文 »