Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
wind57 committed Dec 14, 2023
1 parent 398a5f1 commit 8f47a9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateBuilder;
Expand Down Expand Up @@ -56,7 +55,6 @@
@Deprecated(forRemoval = true)
public class KubernetesDiscoveryClientAutoConfiguration {

@ConditionalOnProperty(value = "use.deprecated.blocking.client.auto.configuration", matchIfMissing = true)
@Configuration(proxyBeanMethods = false)
public static class Servlet {

Expand Down Expand Up @@ -86,7 +84,6 @@ public InitializingBean indicatorInitializer(ApplicationEventPublisher applicati

}

@ConditionalOnProperty(value = "use.deprecated.reactive.client.auto.configuration", matchIfMissing = true)
@Configuration(proxyBeanMethods = false)
@ConditionalOnReactiveDiscoveryEnabled
public static class Reactive {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@

package org.springframework.cloud.kubernetes.discovery;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;

/**
* @author wind57
*/
@SpringBootApplication
@SpringBootConfiguration
@EnableAutoConfiguration
class App {

static void main(String[] args) {

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
@SpringBootTest(properties = { "spring.main.cloud-platform=kubernetes", "spring.cloud.config.enabled=false",
"spring.cloud.kubernetes.discovery.discovery-server-url=http://example",
"spring.cloud.discovery.reactive.enabled=false", "use.deprecated.blocking.client.auto.configuration=false" },
"spring.cloud.discovery.reactive.enabled=false" },
classes = { HealthEventListenerConfiguration.class, App.class })
class BlockingDiscoveryHealthPublishedEventTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
@SpringBootTest(properties = { "spring.main.cloud-platform=kubernetes", "spring.cloud.config.enabled=false",
"spring.cloud.kubernetes.discovery.discovery-server-url=http://example",
// disable blocking implementation
"spring.cloud.discovery.blocking.enabled=false", "use.deprecated.reactive.client.auto.configuration=false",
"use.deprecated.blocking.client.auto.configuration=false" },
"spring.cloud.discovery.blocking.enabled=false" },
classes = { HealthEventListenerConfiguration.class, App.class })
class ReactiveDiscoveryHealthPublishedEventTest {

Expand Down

0 comments on commit 8f47a9f

Please sign in to comment.