|
@@ -3,9 +3,10 @@ package com.qmth.ops.aliyun.controller;
|
|
import com.qmth.ops.aliyun.utils.SlsService;
|
|
import com.qmth.ops.aliyun.utils.SlsService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+import org.springframework.web.server.ServerWebExchange;
|
|
import reactor.core.publisher.Mono;
|
|
import reactor.core.publisher.Mono;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -13,7 +14,7 @@ import reactor.core.publisher.Mono;
|
|
* @date 2019/3/23 09:54
|
|
* @date 2019/3/23 09:54
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping("/sls")
|
|
|
|
|
|
+@RequestMapping("/api/sls")
|
|
@CrossOrigin
|
|
@CrossOrigin
|
|
public class SlsController {
|
|
public class SlsController {
|
|
|
|
|
|
@@ -25,8 +26,10 @@ public class SlsController {
|
|
return Mono.just(slsService.getProject());
|
|
return Mono.just(slsService.getProject());
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping("/view")
|
|
|
|
- public Mono<String> view(@RequestParam String project, @RequestParam String store) {
|
|
|
|
- return slsService.view(project, store);
|
|
|
|
|
|
+ @PostMapping("/view")
|
|
|
|
+ public Mono<String> view(ServerWebExchange exchange) {
|
|
|
|
+ return exchange.getFormData().flatMap(form -> {
|
|
|
|
+ return slsService.view(form.getFirst("project"), form.getFirst("store"));
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|