110 lines
2.2 KiB
Java
110 lines
2.2 KiB
Java
|
|
package com.example.demo.config;
|
||
|
|
|
||
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||
|
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 腾讯云配置类
|
||
|
|
*/
|
||
|
|
@Configuration
|
||
|
|
@ConfigurationProperties(prefix = "tencent.cloud")
|
||
|
|
public class TencentCloudConfig {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 腾讯云SecretId
|
||
|
|
*/
|
||
|
|
private String secretId;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 腾讯云SecretKey
|
||
|
|
*/
|
||
|
|
private String secretKey;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 邮件推送服务配置
|
||
|
|
*/
|
||
|
|
private SesConfig ses = new SesConfig();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 邮件推送服务配置
|
||
|
|
*/
|
||
|
|
public static class SesConfig {
|
||
|
|
/**
|
||
|
|
* 邮件服务地域
|
||
|
|
*/
|
||
|
|
private String region = "ap-beijing";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 发件人邮箱
|
||
|
|
*/
|
||
|
|
private String fromEmail;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 发件人名称
|
||
|
|
*/
|
||
|
|
private String fromName;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 验证码邮件模板ID
|
||
|
|
*/
|
||
|
|
private String templateId;
|
||
|
|
|
||
|
|
public String getRegion() {
|
||
|
|
return region;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setRegion(String region) {
|
||
|
|
this.region = region;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getFromEmail() {
|
||
|
|
return fromEmail;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setFromEmail(String fromEmail) {
|
||
|
|
this.fromEmail = fromEmail;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getFromName() {
|
||
|
|
return fromName;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setFromName(String fromName) {
|
||
|
|
this.fromName = fromName;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getTemplateId() {
|
||
|
|
return templateId;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setTemplateId(String templateId) {
|
||
|
|
this.templateId = templateId;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getSecretId() {
|
||
|
|
return secretId;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setSecretId(String secretId) {
|
||
|
|
this.secretId = secretId;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getSecretKey() {
|
||
|
|
return secretKey;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setSecretKey(String secretKey) {
|
||
|
|
this.secretKey = secretKey;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public SesConfig getSes() {
|
||
|
|
return ses;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setSes(SesConfig ses) {
|
||
|
|
this.ses = ses;
|
||
|
|
}
|
||
|
|
}
|