shengyang000 преди 5 години
родител
ревизия
fc755981a0
променени са 2 файла, в които са добавени 19 реда и са изтрити 1 реда
  1. 18 1
      src/main/java/com/unissoft/controller/TestController.java
  2. 1 0
      src/main/resources/bootstrap.yml

+ 18 - 1
src/main/java/com/unissoft/controller/TestController.java

@@ -1,17 +1,34 @@
1 1
 package com.unissoft.controller;
2 2
 
3
+import com.unissoft.result.ResultView;
4
+import io.swagger.annotations.ApiOperation;
5
+import org.springframework.beans.factory.annotation.Value;
3 6
 import org.springframework.web.bind.annotation.GetMapping;
4 7
 import org.springframework.web.bind.annotation.RequestMapping;
5 8
 import org.springframework.web.bind.annotation.RestController;
6
-import com.unissoft.result.ResultView;
7 9
 
8 10
 @RestController
9 11
 @RequestMapping("/test")
10 12
 public class TestController {
11 13
 
14
+    @Value("${ymllocation}")
15
+    private String ymllocation;
16
+
17
+    @Value("${ymlconfig}")
18
+    private String ymlconfig;
19
+
12 20
     @GetMapping("/getName")
13 21
     public ResultView getName() {
14 22
         String name = "测试demo";
15 23
         return ResultView.success(name);
16 24
     }
25
+
26
+
27
+    @ApiOperation(value = "测试yml", notes = "")
28
+    @GetMapping("/authority_button/testYmllocation")
29
+    public ResultView testRedisPublish() {
30
+        return ResultView.success(ymllocation + "-----" + ymlconfig);
31
+    }
32
+
33
+
17 34
 }

+ 1 - 0
src/main/resources/bootstrap.yml

@@ -22,3 +22,4 @@ spring:
22 22
         service-id: CSC-SZLS-CONFIG  # 注册中心的服务名
23 23
       profile: dev  # 指定配置文件的环境
24 24
       label: master
25
+ymllocation: csc-szls-oauth-inner