format code

pull/754/head
weihu 3 years ago
parent 04e1c05fd9
commit 1f9f0dce03

@ -106,6 +106,7 @@ public class ConfigHandlerConfiguration {
@ConditionalOnClass(ConfigFileService.class) @ConditionalOnClass(ConfigFileService.class)
@ConditionalOnProperty(prefix = BootstrapConfigProperties.PREFIX, name = POLARIS) @ConditionalOnProperty(prefix = BootstrapConfigProperties.PREFIX, name = POLARIS)
static class Polaris { static class Polaris {
@Bean @Bean
public PolarisRefresherHandler polarisRefresher(ConfigFileService configFileService) { public PolarisRefresherHandler polarisRefresher(ConfigFileService configFileService) {
return new PolarisRefresherHandler(configFileService); return new PolarisRefresherHandler(configFileService);

@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.hippo4j.config.springboot.starter.refresher; package cn.hippo4j.config.springboot.starter.refresher;
import java.util.Map; import java.util.Map;
@ -39,7 +56,6 @@ public class PolarisRefresherHandler extends AbstractConfigThreadPoolDynamicRefr
@Value(POLARIS_FILE_NAME) @Value(POLARIS_FILE_NAME)
private String fileName; private String fileName;
@Override @Override
public String getProperties() { public String getProperties() {
ConfigKVFile configFile = getConfigKVFile(); ConfigKVFile configFile = getConfigKVFile();
@ -62,7 +78,8 @@ public class PolarisRefresherHandler extends AbstractConfigThreadPoolDynamicRefr
} }
private ConfigKVFile getConfigKVFile() { private ConfigKVFile getConfigKVFile() {
return Objects.equals(POLARIS_FILE_TYPE, "yaml") ? configFileService.getConfigYamlFile(namespace, fileGroup, fileName) : configFileService.getConfigPropertiesFile(namespace, fileGroup, fileName); return Objects.equals(POLARIS_FILE_TYPE, "yaml") ? configFileService.getConfigYamlFile(namespace, fileGroup, fileName)
: configFileService.getConfigPropertiesFile(namespace, fileGroup, fileName);
} }
} }

Loading…
Cancel
Save