|
| 1 | +/* |
| 2 | + * Copyright 2013-2021 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 | + |
1 | 17 | package org.springframework.cloud.kubernetes.configserver; |
2 | 18 |
|
3 | 19 | import org.springframework.beans.factory.ObjectProvider; |
4 | 20 | import org.springframework.cloud.config.server.environment.EnvironmentRepositoryFactory; |
5 | | -import org.springframework.stereotype.Component; |
6 | 21 |
|
7 | 22 | /** |
8 | 23 | * Factory class for creating instances of {@link KubernetesEnvironmentRepository}. |
9 | 24 | */ |
10 | | -@Component |
11 | 25 | public class KubernetesEnvironmentRepositoryFactory |
12 | | - implements EnvironmentRepositoryFactory<KubernetesEnvironmentRepository, KubernetesConfigServerProperties> { |
| 26 | + implements EnvironmentRepositoryFactory<KubernetesEnvironmentRepository, KubernetesConfigServerProperties> { |
13 | 27 |
|
14 | 28 | private final ObjectProvider<KubernetesEnvironmentRepository> kubernetesEnvironmentRepositoryProvider; |
15 | 29 |
|
16 | | - public KubernetesEnvironmentRepositoryFactory(ObjectProvider<KubernetesEnvironmentRepository> kubernetesEnvironmentRepositoryProvider) { |
| 30 | + public KubernetesEnvironmentRepositoryFactory( |
| 31 | + ObjectProvider<KubernetesEnvironmentRepository> kubernetesEnvironmentRepositoryProvider) { |
17 | 32 | this.kubernetesEnvironmentRepositoryProvider = kubernetesEnvironmentRepositoryProvider; |
18 | 33 | } |
19 | 34 |
|
20 | 35 | @Override |
21 | 36 | public KubernetesEnvironmentRepository build(KubernetesConfigServerProperties environmentProperties) { |
22 | 37 | return kubernetesEnvironmentRepositoryProvider.getIfAvailable(); |
23 | 38 | } |
| 39 | + |
24 | 40 | } |
0 commit comments