2021-04-09 20:19:31 +08:00
|
|
|
|
package ink.wgink.properties;
|
2021-04-08 22:53:25 +08:00
|
|
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* When you feel like quitting. Think about why you started
|
|
|
|
|
* 当你想要放弃的时候,想想当初你为何开始
|
|
|
|
|
*
|
|
|
|
|
* @ClassName: WechatMiniProgramProperties
|
|
|
|
|
* @Description: 微信小程序
|
|
|
|
|
* @Author: WangGeng
|
|
|
|
|
* @Date: 2020/5/9 15:50
|
|
|
|
|
* @Version: 1.0
|
|
|
|
|
**/
|
|
|
|
|
@Configuration
|
|
|
|
|
@ConfigurationProperties(prefix = "open-platform.wechat.mini-app")
|
|
|
|
|
public class MiniAppProperties {
|
|
|
|
|
|
|
|
|
|
private Boolean active;
|
|
|
|
|
private String authorizeUrl;
|
|
|
|
|
private String grantType;
|
|
|
|
|
private String appKey;
|
|
|
|
|
private String appSecret;
|
|
|
|
|
|
|
|
|
|
public Boolean getActive() {
|
|
|
|
|
return active;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setActive(Boolean active) {
|
|
|
|
|
this.active = active;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getAuthorizeUrl() {
|
|
|
|
|
return authorizeUrl == null ? "" : authorizeUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAuthorizeUrl(String authorizeUrl) {
|
|
|
|
|
this.authorizeUrl = authorizeUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getGrantType() {
|
|
|
|
|
return grantType == null ? "" : grantType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setGrantType(String grantType) {
|
|
|
|
|
this.grantType = grantType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getAppKey() {
|
|
|
|
|
return appKey == null ? "" : appKey;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAppKey(String appKey) {
|
|
|
|
|
this.appKey = appKey;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getAppSecret() {
|
|
|
|
|
return appSecret == null ? "" : appSecret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAppSecret(String appSecret) {
|
|
|
|
|
this.appSecret = appSecret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
final StringBuilder sb = new StringBuilder("{");
|
|
|
|
|
sb.append("\"active\":")
|
|
|
|
|
.append(active);
|
|
|
|
|
sb.append(",\"authorizeUrl\":\"")
|
|
|
|
|
.append(authorizeUrl).append('\"');
|
|
|
|
|
sb.append(",\"grantType\":\"")
|
|
|
|
|
.append(grantType).append('\"');
|
|
|
|
|
sb.append(",\"appKey\":\"")
|
|
|
|
|
.append(appKey).append('\"');
|
|
|
|
|
sb.append(",\"appSecret\":\"")
|
|
|
|
|
.append(appSecret).append('\"');
|
|
|
|
|
sb.append('}');
|
|
|
|
|
return sb.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|