org.springframework.cloud.client.actuator.HasFeatures Java Examples
The following examples show how to use
org.springframework.cloud.client.actuator.HasFeatures.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void worksWithoutActuator() { applicationContextRunner .withClassLoader( new FilteredClassLoader("org.springframework.boot.actuate")) .run(context -> { assertThat(context) .doesNotHaveBean(DiscoveryClientHealthIndicator.class); assertThat(context) .doesNotHaveBean(DiscoveryCompositeHealthContributor.class); then(context.getBeansOfType(HasFeatures.class).values()).isEmpty(); }); }
Example #2
Source File: CommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void disableBlocking() { applicationContextRunner .withPropertyValues("spring.cloud.discovery.blocking.enabled=false", "management.endpoints.web.exposure.include=features") .run(ctxt -> { assertThat(ctxt) .doesNotHaveBean(DiscoveryClientHealthIndicator.class); assertThat(ctxt) .doesNotHaveBean(DiscoveryCompositeHealthContributor.class); then(ctxt.getBean(FeaturesEndpoint.class)).isNotNull(); // features actuator is independent of discovery assertThat(ctxt).doesNotHaveBean(HasFeatures.class); }); }
Example #3
Source File: CommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void disableAll() { applicationContextRunner .withPropertyValues("spring.cloud.discovery.enabled=false", "management.endpoints.web.exposure.include=features") .run(ctxt -> { assertThat(ctxt) .doesNotHaveBean(DiscoveryClientHealthIndicator.class); assertThat(ctxt) .doesNotHaveBean(DiscoveryCompositeHealthContributor.class); then(ctxt.getBean(FeaturesEndpoint.class)).isNotNull(); // features actuator is independent of discovery assertThat(ctxt).doesNotHaveBean(HasFeatures.class); }); }
Example #4
Source File: ReactiveCommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void beansCreatedNormally() { applicationContextRunner .withPropertyValues("management.endpoints.web.exposure.include=features") .run(context -> { then(context.getBean(ReactiveDiscoveryClientHealthIndicator.class)) .isNotNull(); then(context .getBean(ReactiveDiscoveryCompositeHealthContributor.class)) .isNotNull(); then(context.getBean(FeaturesEndpoint.class)).isNotNull(); then(context.getBeansOfType(HasFeatures.class).values()).isNotEmpty(); }); }
Example #5
Source File: ReactiveCommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void disableAll() { applicationContextRunner .withPropertyValues("spring.cloud.discovery.enabled=false", "management.endpoints.web.exposure.include=features") .run(context -> { assertThat(context).doesNotHaveBean( ReactiveDiscoveryClientHealthIndicator.class); assertThat(context).doesNotHaveBean( ReactiveDiscoveryCompositeHealthContributor.class); // features actuator is independent of discovery then(context.getBean(FeaturesEndpoint.class)).isNotNull(); assertThat(context).doesNotHaveBean(HasFeatures.class); }); }
Example #6
Source File: ReactiveCommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void disableReactive() { applicationContextRunner .withPropertyValues("spring.cloud.discovery.reactive.enabled=false", "management.endpoints.web.exposure.include=features") .run(context -> { assertThat(context).doesNotHaveBean( ReactiveDiscoveryClientHealthIndicator.class); assertThat(context).doesNotHaveBean( ReactiveDiscoveryCompositeHealthContributor.class); // features actuator is independent of discovery then(context.getBean(FeaturesEndpoint.class)).isNotNull(); assertThat(context).doesNotHaveBean(HasFeatures.class); }); }
Example #7
Source File: ReactiveCommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void worksWithoutActuator() { applicationContextRunner .withClassLoader( new FilteredClassLoader("org.springframework.boot.actuate")) .run(context -> { assertThat(context).doesNotHaveBean( ReactiveDiscoveryClientHealthIndicator.class); assertThat(context).doesNotHaveBean( ReactiveDiscoveryCompositeHealthContributor.class); then(context.getBeansOfType(HasFeatures.class).values()).isEmpty(); }); }
Example #8
Source File: ReactiveCommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void worksWithoutWebflux() { applicationContextRunner .withClassLoader( new FilteredClassLoader("org.springframework.web.reactive")) .run(context -> { assertThat(context).doesNotHaveBean( ReactiveDiscoveryClientHealthIndicator.class); assertThat(context).doesNotHaveBean( ReactiveDiscoveryCompositeHealthContributor.class); assertThat(context).doesNotHaveBean(HasFeatures.class); }); }
Example #9
Source File: CommonsClientAutoConfigurationTests.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
@Test public void beansCreatedNormally() { applicationContextRunner .withConfiguration( AutoConfigurations.of(HealthEndpointAutoConfiguration.class)) .withPropertyValues("management.endpoints.web.exposure.include=features") .run(ctxt -> { then(ctxt.getBean(DiscoveryClientHealthIndicator.class)).isNotNull(); then(ctxt.getBean(DiscoveryCompositeHealthContributor.class)) .isNotNull(); then(ctxt.getBean(FeaturesEndpoint.class)).isNotNull(); then(ctxt.getBeansOfType(HasFeatures.class).values()).isNotEmpty(); }); }
Example #10
Source File: EurekaClientAutoConfiguration.java From spring-cloud-netflix with Apache License 2.0 | 4 votes |
@Bean public HasFeatures eurekaFeature() { return HasFeatures.namedFeature("Eureka Client", EurekaClient.class); }
Example #11
Source File: FeignAutoConfiguration.java From spring-cloud-openfeign with Apache License 2.0 | 4 votes |
@Bean public HasFeatures feignFeature() { return HasFeatures.namedFeature("Feign", Feign.class); }
Example #12
Source File: EurekaServerAutoConfiguration.java From spring-cloud-netflix with Apache License 2.0 | 4 votes |
@Bean public HasFeatures eurekaServerFeature() { return HasFeatures.namedFeature("Eureka Server", EurekaServerAutoConfiguration.class); }
Example #13
Source File: ReactiveCommonsClientAutoConfiguration.java From spring-cloud-commons with Apache License 2.0 | 4 votes |
@Bean public HasFeatures reactiveCommonsFeatures() { return HasFeatures.abstractFeatures(ReactiveDiscoveryClient.class, ReactiveLoadBalancer.class); }
Example #14
Source File: CommonsClientAutoConfiguration.java From spring-cloud-commons with Apache License 2.0 | 4 votes |
@Bean public HasFeatures commonsFeatures() { return HasFeatures.abstractFeatures(DiscoveryClient.class, LoadBalancerClient.class); }
Example #15
Source File: WebClientRetrofitAutoConfiguration.java From spring-cloud-square with Apache License 2.0 | 4 votes |
@Bean public HasFeatures retrofitFeature() { return HasFeatures.namedFeature("Retrofit", Retrofit.class); }
Example #16
Source File: RetrofitAutoConfiguration.java From spring-cloud-square with Apache License 2.0 | 4 votes |
@Bean public HasFeatures retrofitFeature() { return HasFeatures.namedFeature("Retrofit", Retrofit.class); }
Example #17
Source File: EurekaServerAutoConfiguration.java From didi-eureka-server with MIT License | 4 votes |
@Bean public HasFeatures eurekaServerFeature() { return HasFeatures.namedFeature("Eureka Server", EurekaServerAutoConfiguration.class); }