cuikaidong
2025-06-12 44e283b774bb1168d0c17dfe5070a1ca8e2274cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package org.jeecg.config;
 
import org.jeecg.common.util.DySmsHelper;
import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
/**
 * 设置静态参数初始化
 */
@Configuration
public class StaticConfig {
 
    @Value("${jeecg.sms.accessKeyId}")
    private String accessKeyId;
 
    @Value("${jeecg.sms.accessKeySecret}")
    private String accessKeySecret;
 
    @Value(value = "${spring.mail.username}")
    private String emailFrom;
 
 
    @Bean
    public void initStatic() {
        DySmsHelper.setAccessKeyId(accessKeyId);
        DySmsHelper.setAccessKeySecret(accessKeySecret);
        EmailSendMsgHandle.setEmailFrom(emailFrom);
    }
}