瀏覽代碼

测试yml

shengyang000 5 年之前
父節點
當前提交
4a0ca27bd6
共有 2 個文件被更改,包括 12 次插入4 次删除
  1. 11 4
      src/main/java/com/unissoft/controller/QuartzController.java
  2. 1 0
      src/main/resources/bootstrap.yml

+ 11 - 4
src/main/java/com/unissoft/controller/QuartzController.java

@@ -8,16 +8,17 @@ import com.unissoft.service.QuartzService;
8 8
 import io.swagger.annotations.ApiOperation;
9 9
 import org.quartz.SchedulerException;
10 10
 import org.springframework.beans.factory.annotation.Autowired;
11
-import org.springframework.web.bind.annotation.PostMapping;
12
-import org.springframework.web.bind.annotation.RequestBody;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-import org.springframework.web.bind.annotation.RestController;
11
+import org.springframework.beans.factory.annotation.Value;
12
+import org.springframework.web.bind.annotation.*;
15 13
 
16 14
 
17 15
 @RestController
18 16
 @RequestMapping("/job")
19 17
 public class QuartzController {
20 18
 
19
+	@Value("${ymllocation}")
20
+	private String ymllocation;
21
+
21 22
     @Autowired
22 23
     private QuartzService quartzService;
23 24
 
@@ -111,4 +112,10 @@ public class QuartzController {
111 112
 //		return ResultView.success();
112 113
 //	}
113 114
 
115
+	@ApiOperation(value = "测试yml", notes = "")
116
+	@GetMapping("/authority_button/testYmllocation")
117
+	public ResultView testRedisPublish() {
118
+		return ResultView.success(ymllocation);
119
+	}
120
+
114 121
 }

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

@@ -25,3 +25,4 @@ spring:
25 25
       profile: dev  # 指定配置文件的环境
26 26
       label: master
27 27
 
28
+ymllocation: inner