一、在yml中添加抖音开放平台的账号基本信息
# 抖音开放平台配置信息
dy:
clientKey: #抖音开放平台key
clientSecret: #抖音开放平台密钥
scope: data.external.user,data.external.item,fans.data,user_info,renew_refresh_token,data.external.user#需要用户开放的权限
responseType: code#填写code就行
redirectUri: #扫码之后的回调地址
state: false
二、设计config文件将抖音数据注入
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConfigurationProperties(prefix = "dy")
public class DouYinConfig {
private String clientKey;