Skip to content

Commit f3db786

Browse files
xujinxujin
authored andcommitted
兼容支持单nacos或单eureka
1 parent bcc8600 commit f3db786

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

moss-web/src/main/java/org/xujin/moss/MossApplication.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
1111
import org.springframework.boot.web.server.ErrorPage;
1212
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
13+
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
1314
import org.springframework.context.annotation.Bean;
1415
import org.springframework.context.annotation.ComponentScan;
1516
import org.springframework.context.annotation.Configuration;
@@ -25,6 +26,10 @@
2526
@EnableAutoConfiguration
2627
@EnableAdminServer
2728
//@EnableScheduling
29+
/**
30+
* 单nacos或单eureka需要把@EnableDiscoveryClient注释打开
31+
*/
32+
//@EnableDiscoveryClient
2833
@ComponentScan("org.xujin.moss.*")
2934
public class MossApplication {
3035

0 commit comments

Comments
 (0)