From fec69fcecdf4e6e37191a49c1bc6bf111198a4f1 Mon Sep 17 00:00:00 2001 From: huangsheng Date: Tue, 30 Jan 2024 11:08:54 +0800 Subject: [PATCH] =?UTF-8?q?Effort=20Task=20#9427=20Cost:1h=20Left:0h=20?= =?UTF-8?q?=E5=BC=95=E5=85=A5nacos=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/pom.xml | 5 +++++ server/src/main/java/cn/keking/ServerMain.java | 2 ++ 2 files changed, 7 insertions(+) diff --git a/server/pom.xml b/server/pom.xml index 6a75cf7..4558b93 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -30,6 +30,11 @@ + + com.alibaba.boot + nacos-config-spring-boot-starter + 0.3.0-RC + org.springframework.boot diff --git a/server/src/main/java/cn/keking/ServerMain.java b/server/src/main/java/cn/keking/ServerMain.java index c712914..0f39381 100644 --- a/server/src/main/java/cn/keking/ServerMain.java +++ b/server/src/main/java/cn/keking/ServerMain.java @@ -1,5 +1,6 @@ package cn.keking; +import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -14,6 +15,7 @@ import org.springframework.util.StopWatch; */ @SpringBootApplication @EnableScheduling +@EnableNacosConfig public class ServerMain { private static final Logger logger = LoggerFactory.getLogger(ServerMain.class);