mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-23 01:39:02 +00:00
Move mail health auto-configuration into spring-boot-mail
Closes gh-46079
This commit is contained in:
@@ -61,7 +61,6 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
optional(project(":spring-boot-project:spring-boot-kafka"))
|
||||
optional(project(":spring-boot-project:spring-boot-mail"))
|
||||
optional(project(":spring-boot-project:spring-boot-mongodb"))
|
||||
optional(project(":spring-boot-project:spring-boot-quartz"))
|
||||
optional(project(":spring-boot-project:spring-boot-r2dbc"))
|
||||
@@ -137,7 +136,6 @@ dependencies {
|
||||
optional("org.aspectj:aspectjweaver")
|
||||
optional("org.cache2k:cache2k-micrometer")
|
||||
optional("org.cache2k:cache2k-spring")
|
||||
optional("org.eclipse.angus:angus-mail")
|
||||
optional("org.eclipse.jetty:jetty-server") {
|
||||
exclude group: "org.eclipse.jetty.toolchain", module: "jetty-jakarta-servlet-api"
|
||||
}
|
||||
|
||||
-6
@@ -65,12 +65,6 @@
|
||||
"description": "Whether to enable liveness state health check.",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"name": "management.health.mail.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Mail health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.mongo.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointAutoCon
|
||||
org.springframework.boot.actuate.autoconfigure.logging.LoggersEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.logging.OpenTelemetryLoggingAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.logging.otlp.OtlpLoggingAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.mail.MailHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.management.HeapDumpWebEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.management.ThreadDumpEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.metrics.amqp.RabbitMetricsAutoConfiguration
|
||||
|
||||
@@ -33,7 +33,7 @@ dependencies {
|
||||
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.mail;
|
||||
package org.springframework.boot.mail.actuate.health.autoconfigure;
|
||||
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
|
||||
@@ -34,10 +34,10 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for {@link MailHealthIndicator}.
|
||||
*
|
||||
* @author Johannes Edmeier
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = MailSenderAutoConfiguration.class)
|
||||
@ConditionalOnClass({ JavaMailSenderImpl.class, MailHealthIndicator.class })
|
||||
@ConditionalOnClass({ JavaMailSenderImpl.class, MailHealthIndicator.class, ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(JavaMailSenderImpl.class)
|
||||
@ConditionalOnEnabledHealthIndicator("mail")
|
||||
public class MailHealthContributorAutoConfiguration
|
||||
+2
-2
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-configuration for actuator JavaMail concerns.
|
||||
* Auto-configuration for JavaMail health integration.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.mail;
|
||||
package org.springframework.boot.mail.actuate.health.autoconfigure;
|
||||
+6
@@ -1,6 +1,12 @@
|
||||
{
|
||||
"groups": [],
|
||||
"properties": [
|
||||
{
|
||||
"name": "management.health.mail.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Mail health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.mail.test-connection",
|
||||
"description": "Whether to test that the mail server is available on startup.",
|
||||
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
org.springframework.boot.mail.actuate.health.autoconfigure.MailHealthContributorAutoConfiguration
|
||||
org.springframework.boot.mail.autoconfigure.MailSenderAutoConfiguration
|
||||
org.springframework.boot.mail.autoconfigure.MailSenderValidatorAutoConfiguration
|
||||
org.springframework.boot.mail.autoconfigure.MailSenderValidatorAutoConfiguration
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.mail;
|
||||
package org.springframework.boot.mail.actuate.health.autoconfigure;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
Reference in New Issue
Block a user