Move mail health auto-configuration into spring-boot-mail
This commit is contained in:
committed by
Phillip Webb
parent
33ac838d26
commit
98de3d3cb0
@@ -44,7 +44,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"))
|
||||
@@ -120,7 +119,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"
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,7 +16,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"))
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -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.",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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