|
|
@ -69,7 +69,7 @@ public class InfoContributorAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void defaultInfoContributorsDisabledWithCustomOne() {
|
|
|
|
public void defaultInfoContributorsDisabledWithCustomOne() {
|
|
|
|
load(CustomInfoProviderConfiguration.class,
|
|
|
|
load(CustomInfoContributorConfiguration.class,
|
|
|
|
"management.info.defaults.enabled:false");
|
|
|
|
"management.info.defaults.enabled:false");
|
|
|
|
Map<String, InfoContributor> beans = this.context
|
|
|
|
Map<String, InfoContributor> beans = this.context
|
|
|
|
.getBeansOfType(InfoContributor.class);
|
|
|
|
.getBeansOfType(InfoContributor.class);
|
|
|
@ -108,7 +108,7 @@ public class InfoContributorAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void customGitInfoContributor() {
|
|
|
|
public void customGitInfoContributor() {
|
|
|
|
load(CustomGitInfoProviderConfiguration.class);
|
|
|
|
load(CustomGitInfoContributorConfiguration.class);
|
|
|
|
assertThat(this.context.getBean(GitInfoContributor.class))
|
|
|
|
assertThat(this.context.getBean(GitInfoContributor.class))
|
|
|
|
.isSameAs(this.context.getBean("customGitInfoContributor"));
|
|
|
|
.isSameAs(this.context.getBean("customGitInfoContributor"));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -143,7 +143,7 @@ public class InfoContributorAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void customBuildInfoContributor() {
|
|
|
|
public void customBuildInfoContributor() {
|
|
|
|
load(CustomBuildInfoProviderConfiguration.class);
|
|
|
|
load(CustomBuildInfoContributorConfiguration.class);
|
|
|
|
assertThat(this.context.getBean(BuildInfoContributor.class))
|
|
|
|
assertThat(this.context.getBean(BuildInfoContributor.class))
|
|
|
|
.isSameAs(this.context.getBean("customBuildInfoContributor"));
|
|
|
|
.isSameAs(this.context.getBean("customBuildInfoContributor"));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -198,7 +198,7 @@ public class InfoContributorAutoConfigurationTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
static class CustomInfoProviderConfiguration {
|
|
|
|
static class CustomInfoContributorConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
public InfoContributor customInfoContributor() {
|
|
|
|
public InfoContributor customInfoContributor() {
|
|
|
@ -212,7 +212,7 @@ public class InfoContributorAutoConfigurationTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
static class CustomGitInfoProviderConfiguration {
|
|
|
|
static class CustomGitInfoContributorConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
public GitInfoContributor customGitInfoContributor() {
|
|
|
|
public GitInfoContributor customGitInfoContributor() {
|
|
|
@ -222,7 +222,7 @@ public class InfoContributorAutoConfigurationTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
static class CustomBuildInfoProviderConfiguration {
|
|
|
|
static class CustomBuildInfoContributorConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
public BuildInfoContributor customBuildInfoContributor() {
|
|
|
|
public BuildInfoContributor customBuildInfoContributor() {
|
|
|
|