shengyang000 5 роки тому
батько
коміт
2375b85b0a

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

@@ -8,22 +8,19 @@ 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.beans.factory.annotation.Value;
12
-import org.springframework.web.bind.annotation.*;
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;
13 15
 
14 16
 
15 17
 @RestController
16 18
 @RequestMapping("/job")
17 19
 public class QuartzController {
18 20
 
19
-	@Value("${ymllocation}")
20
-	private String ymllocation;
21
-
22 21
     @Autowired
23 22
     private QuartzService quartzService;
24 23
 
25
-//	@Autowired
26
-//    private PublishService publishService;
27 24
 
28 25
 	@ApiOperation(value = "新增任务", notes = "")
29 26
 	@PostMapping("/authority_button/add")
@@ -98,24 +95,4 @@ public class QuartzController {
98 95
 		return ResultView.error();
99 96
 	}
100 97
 
101
-//	@ApiOperation(value = "测试Redis发布", notes = "")
102
-//	@GetMapping("/authority_button/testRedisPublish")
103
-//	public ResultView testRedisPublish() {
104
-//		MessageVO vo = new MessageVO();
105
-//		vo.setTitle("aaa");
106
-//		vo.setContent("测试");
107
-//		vo.setFromUserId(1);
108
-//		vo.setToUserId(5);
109
-//		vo.setType(10);
110
-//
111
-//		publishService.publish(GrainConstant.MQ_MSG_CHANNEL, vo);
112
-//		return ResultView.success();
113
-//	}
114
-
115
-	@ApiOperation(value = "测试yml", notes = "")
116
-	@GetMapping("/authority_button/testYmllocation")
117
-	public ResultView testRedisPublish() {
118
-		return ResultView.success(ymllocation);
119
-	}
120
-
121 98
 }

+ 44 - 0
src/main/java/com/unissoft/controller/TestController.java

@@ -0,0 +1,44 @@
1
+package com.unissoft.controller;
2
+
3
+import com.unissoft.result.ResultView;
4
+import io.swagger.annotations.ApiOperation;
5
+import org.springframework.beans.factory.annotation.Value;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.RequestMapping;
8
+import org.springframework.web.bind.annotation.RestController;
9
+
10
+
11
+@RestController
12
+@RequestMapping("/test")
13
+public class TestController {
14
+
15
+//	@Autowired
16
+//	private PublishService publishService;
17
+
18
+	@Value("${ymllocation}")
19
+	private String ymllocation;
20
+
21
+	@Value("${ymlconfig}")
22
+	private String ymlconfig;
23
+
24
+	@ApiOperation(value = "测试yml", notes = "")
25
+	@GetMapping("/authority_button/testYmllocation")
26
+	public ResultView testRedisPublish() {
27
+		return ResultView.success(ymllocation + "-----" + ymlconfig);
28
+	}
29
+
30
+//	@ApiOperation(value = "测试Redis发布", notes = "")
31
+//	@GetMapping("/authority_button/testRedisPublish")
32
+//	public ResultView testRedisPublish() {
33
+//		MessageVO vo = new MessageVO();
34
+//		vo.setTitle("aaa");
35
+//		vo.setContent("测试");
36
+//		vo.setFromUserId(1);
37
+//		vo.setToUserId(5);
38
+//		vo.setType(10);
39
+//
40
+//		publishService.publish(GrainConstant.MQ_MSG_CHANNEL, vo);
41
+//		return ResultView.success();
42
+//	}
43
+
44
+}

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

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