shengyang000 пре 5 година
родитељ
комит
fc755981a0

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

@@ -1,17 +1,34 @@
1
 package com.unissoft.controller;
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
 import org.springframework.web.bind.annotation.GetMapping;
6
 import org.springframework.web.bind.annotation.GetMapping;
4
 import org.springframework.web.bind.annotation.RequestMapping;
7
 import org.springframework.web.bind.annotation.RequestMapping;
5
 import org.springframework.web.bind.annotation.RestController;
8
 import org.springframework.web.bind.annotation.RestController;
6
-import com.unissoft.result.ResultView;
7
 
9
 
8
 @RestController
10
 @RestController
9
 @RequestMapping("/test")
11
 @RequestMapping("/test")
10
 public class TestController {
12
 public class TestController {
11
 
13
 
14
+    @Value("${ymllocation}")
15
+    private String ymllocation;
16
+
17
+    @Value("${ymlconfig}")
18
+    private String ymlconfig;
19
+
12
     @GetMapping("/getName")
20
     @GetMapping("/getName")
13
     public ResultView getName() {
21
     public ResultView getName() {
14
         String name = "测试demo";
22
         String name = "测试demo";
15
         return ResultView.success(name);
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
         service-id: CSC-SZLS-CONFIG  # 注册中心的服务名
22
         service-id: CSC-SZLS-CONFIG  # 注册中心的服务名
23
       profile: dev  # 指定配置文件的环境
23
       profile: dev  # 指定配置文件的环境
24
       label: master
24
       label: master
25
+ymllocation: csc-szls-oauth-inner