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:
@@ -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
|
||||
|
@@ -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...");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user