package com.sinata.appointment.config;
|
|
import lombok.Data;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
@Data
|
@ConfigurationProperties(prefix = "wechat.official-account")
|
public class WechatOfficialAccountProperties {
|
|
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();
|
}
|
}
|