diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/ruoyi/common/mail/config/MailConfig.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/ruoyi/common/mail/config/MailConfig.java index 44a95b6c..7ad8bce5 100644 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/ruoyi/common/mail/config/MailConfig.java +++ b/ruoyi-common/ruoyi-common-mail/src/main/java/com/ruoyi/common/mail/config/MailConfig.java @@ -13,11 +13,11 @@ import org.springframework.context.annotation.Bean; * @author Michelle.Chung */ @AutoConfiguration -@ConditionalOnProperty(value = "mail.enabled", havingValue = "true") @EnableConfigurationProperties(MailProperties.class) public class MailConfig { @Bean + @ConditionalOnProperty(value = "mail.enabled", havingValue = "true") public MailAccount mailAccount(MailProperties mailProperties) { MailAccount account = new MailAccount(); account.setHost(mailProperties.getHost());