提交 f8b735be 编写于 作者: Q qinyingjie

fix:配置nacos

上级 968af775
......@@ -3,6 +3,14 @@ package com.kwan.springcloudalibaba;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* http://localhost:18082/nacos/nameInfo
*
* @author : qinyingjie
* @version : 2.2.0
* @date : 2023/1/17 12:37
*/
@SpringBootApplication
public class NacosApplication {
......
......@@ -2,11 +2,14 @@ package com.kwan.springcloudalibaba.controller;
import com.kwan.springcloudalibaba.common.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RefreshScope
@RestController
@RequestMapping("/nacos")
public class NacosController {
......
......@@ -21,6 +21,7 @@ spring:
cloud:
nacos:
discovery:
server-addr: 192.168.172.128:8848
password: nacos
username: nacos
server-addr: http://120.79.36.53:8848
config:
server-addr: http://120.79.36.53:8848
file-extension: yaml
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册