Skip to content

Commit

Permalink
Merge pull request #502 from RADAR-base/bugfix/disable-mail-autoconfig
Browse files Browse the repository at this point in the history
Disable Spring Boot mail autoconfiguration when not sending notifications via email
  • Loading branch information
pvannierop authored Oct 4, 2024
2 parents 6576954 + e412d85 commit cf251a1
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.radarbase.appserver.config;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(value = "radar.notification.email.enabled", havingValue = "false", matchIfMissing = true)
@EnableAutoConfiguration(exclude = {
org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration.class,
org.springframework.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration.class
})
public class MailAutoconfigureExcludeConfig { }

0 comments on commit cf251a1

Please sign in to comment.