Create spring-boot-health module

This commit is contained in:
Phillip Webb
2025-06-12 09:57:33 -07:00
parent dec8093e75
commit 2ddca76076
212 changed files with 753 additions and 632 deletions

View File

@@ -19,13 +19,13 @@ package org.springframework.boot.mail.autoconfigure;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
import org.springframework.boot.actuate.health.HealthContributor;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.mail.actuate.health.MailHealthIndicator;
import org.springframework.boot.health.HealthContributor;
import org.springframework.boot.mail.health.MailHealthIndicator;
import org.springframework.context.annotation.Bean;
import org.springframework.mail.javamail.JavaMailSenderImpl;

View File

@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.boot.mail.actuate.health;
package org.springframework.boot.mail.health;
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health.Builder;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.health.AbstractHealthIndicator;
import org.springframework.boot.health.Health;
import org.springframework.boot.health.HealthIndicator;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.util.StringUtils;
@@ -39,7 +39,7 @@ public class MailHealthIndicator extends AbstractHealthIndicator {
}
@Override
protected void doHealthCheck(Builder builder) throws Exception {
protected void doHealthCheck(Health.Builder builder) throws Exception {
String host = this.mailSender.getHost();
int port = this.mailSender.getPort();
StringBuilder location = new StringBuilder((host != null) ? host : "");

View File

@@ -17,4 +17,4 @@
/**
* Health integration for JavaMail.
*/
package org.springframework.boot.mail.actuate.health;
package org.springframework.boot.mail.health;

View File

@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.mail.actuate.health.MailHealthIndicator;
import org.springframework.boot.mail.health.MailHealthIndicator;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.mail.actuate.health;
package org.springframework.boot.mail.health;
import java.util.Properties;
@@ -29,8 +29,8 @@ import jakarta.mail.URLName;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.Status;
import org.springframework.boot.health.Health;
import org.springframework.boot.health.Status;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import static org.assertj.core.api.Assertions.assertThat;