Effort Task #9427 Cost:1h Left:0h 引入nacos配置,配置调整

This commit is contained in:
huangsheng 2024-01-30 11:08:54 +08:00
parent de3a4cb120
commit fec69fcecd
2 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,11 @@
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>nacos-config-spring-boot-starter</artifactId>
<version>0.3.0-RC</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@ -1,5 +1,6 @@
package cn.keking; package cn.keking;
import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -14,6 +15,7 @@ import org.springframework.util.StopWatch;
*/ */
@SpringBootApplication @SpringBootApplication
@EnableScheduling @EnableScheduling
@EnableNacosConfig
public class ServerMain { public class ServerMain {
private static final Logger logger = LoggerFactory.getLogger(ServerMain.class); private static final Logger logger = LoggerFactory.getLogger(ServerMain.class);