1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Polish Config Server

This commit is contained in:
mercyblitz
2018-11-19 16:18:33 +08:00
parent 0d88d81996
commit b4b8fa0d19
4 changed files with 22 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.config.server.config.ConfigServerAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* Nacos Config Server Auto-Configuration
@@ -35,6 +36,7 @@ import org.springframework.context.annotation.ComponentScan;
"com.alibaba.nacos.config.server",
})
@AutoConfigureBefore(ConfigServerAutoConfiguration.class)
@Configuration
public class NacosConfigServerAutoConfiguration {
@Bean

View File

@@ -16,9 +16,11 @@
*/
package org.springframework.cloud.alibaba.nacos.config.server.bootstrap;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.context.annotation.Bean;
/**
* Nacos Config Server Bootstrap
@@ -34,4 +36,12 @@ public class NacosConfigServerBootstrap {
System.setProperty("nacos.standalone", "true");
SpringApplication.run(NacosConfigServerBootstrap.class);
}
@Bean
public ApplicationRunner applicationRunner() {
return args -> {
System.out.println("Running...");
};
}
}