Skip to content

Commit d3c9203

Browse files
committed
fix test
Signed-off-by: wind57 <[email protected]>
1 parent f198415 commit d3c9203

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2013-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.cloud.kubernetes.fabric8.discovery;
18+
19+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
20+
import org.springframework.boot.context.config.ConfigDataLocation;
21+
import org.springframework.boot.context.config.ConfigDataLocationResolverContext;
22+
import org.springframework.boot.context.config.Profiles;
23+
import org.springframework.cloud.kubernetes.commons.KubernetesNamespaceProvider;
24+
import org.springframework.cloud.kubernetes.commons.configdata.ConfigDataPropertiesHolder;
25+
import org.springframework.cloud.kubernetes.commons.configdata.KubernetesConfigDataLocationResolver;
26+
27+
/**
28+
* @author wind57
29+
*/
30+
@ConditionalOnProperty(value = "dummy.config.loader.enabled", havingValue = "true", matchIfMissing = false)
31+
class DummyConfigDataLocationResolver extends KubernetesConfigDataLocationResolver {
32+
33+
@Override
34+
protected void registerBeans(ConfigDataLocationResolverContext resolverContext,
35+
ConfigDataLocation location, Profiles profiles, ConfigDataPropertiesHolder properties, KubernetesNamespaceProvider namespaceProvider) {
36+
37+
}
38+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
org.springframework.boot.context.config.ConfigDataLocationResolver=\
2-
org.springframework.cloud.kubernetes.DummyConfigDataLocationResolver
2+
org.springframework.cloud.kubernetes.fabric8.discovery.DummyConfigDataLocationResolver

0 commit comments

Comments
 (0)