package com.sinata.appointment.config;
|
|
import lombok.Data;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
@Data
|
@ConfigurationProperties(prefix = "wechat.miniapp")
|
public class WechatMiniAppProperties {
|
|
private String appId = "";
|
|
private String appSecret = "";
|
|
/**
|
* true 或未配置 appId/secret 时使用桩实现(联调不上微信服务器)。
|
*/
|
private boolean stub = true;
|
|
public boolean useStub() {
|
return stub
|
|| appId == null
|
|| appId.isBlank()
|
|| appSecret == null
|
|| appSecret.isBlank();
|
}
|
}
|