| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package com.malk.server.beisen;
- import com.malk.utils.UtilMap;
- import lombok.Data;
- import org.springframework.boot.context.properties.ConfigurationProperties;
- import org.springframework.stereotype.Component;
- import java.util.Map;
- /**
- * 北森配置
- */
- @Data
- @Component
- @ConfigurationProperties(prefix = "beisen")
- public class BSConf {
- private String tenantId;
- private String appKey;
- private String appSecret;
- private String baseUrl;
- /**
- * Token有效期(秒)
- */
- public static final int TOKEN_EXPIRE = 7200;
- /**
- * 默认分页大小
- */
- public static final int DEFAULT_PAGE_SIZE = 100;
- /**
- * token授权参数
- */
- public static Map initTokenHeader(String accessToken) {
- return UtilMap.map("Authorization", "Bearer " + accessToken);
- }
- }
|