format code

pull/931/head
zkzlx 5 years ago
parent e774cbe74d
commit 9ab9141895

@ -30,8 +30,7 @@ import org.springframework.context.ApplicationContextAware;
* @author <a href="mailto:liaochunyhm@live.com">liaochuntao</a>
*/
public class NacosConfigManager implements ApplicationContextAware {
private static final Logger log = LoggerFactory
.getLogger(NacosConfigManager.class);
private static final Logger log = LoggerFactory.getLogger(NacosConfigManager.class);
private ConfigService configService;
public ConfigService getConfigService() {
@ -44,9 +43,11 @@ public class NacosConfigManager implements ApplicationContextAware {
NacosConfigProperties properties = applicationContext
.getBean(NacosConfigProperties.class);
try {
configService = NacosFactory.createConfigService(properties.getConfigServiceProperties());
configService = NacosFactory
.createConfigService(properties.getConfigServiceProperties());
properties.initConfigService(configService);
} catch (NacosException e) {
}
catch (NacosException e) {
log.error("create config service error!properties={},e=,", properties, e);
}
}

@ -411,11 +411,11 @@ public class NacosConfigProperties {
return configService;
}
public void initConfigService(ConfigService configService){
public void initConfigService(ConfigService configService) {
this.configService = configService;
}
public Properties getConfigServiceProperties(){
public Properties getConfigServiceProperties() {
Properties properties = new Properties();
properties.put(SERVER_ADDR, Objects.toString(this.serverAddr, ""));
properties.put(ENCODE, Objects.toString(this.encode, ""));

Loading…
Cancel
Save