赞
踩
2.mail配置如下
@Data
@Component
@ConfigurationProperties(prefix = “sender-email”, ignoreUnknownFields = false)
public class EmailConfig {
private Map<String,MailProperties> configs;
public Map<String, MailProperties> getConfigs() {
return configs;
}
public void setConfigs(Map<String, MailProperties> configs) {
this.configs = configs;
}
@Data
public static class MailProperties {
private String host;
private String username;
private String password;
private String senderName;
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。