|
@@ -0,0 +1,43 @@
|
|
|
+/*
|
|
|
+ * *************************************************
|
|
|
+ * Copyright (c) 2019 QMTH. All Rights Reserved.
|
|
|
+ * Created by Deason on 2019-08-19 10:38:43.
|
|
|
+ * *************************************************
|
|
|
+ */
|
|
|
+
|
|
|
+package cn.com.qmth.examcloud.app.controller;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.app.core.router.Router;
|
|
|
+import cn.com.qmth.examcloud.app.model.Result;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_KEY;
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 路由相关接口
|
|
|
+ *
|
|
|
+ * @author: fengdesheng
|
|
|
+ * @since: 2019/8/19
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("${$rmp}/")
|
|
|
+@Api(tags = "路由相关接口")
|
|
|
+public class RouterController {
|
|
|
+ private static Logger log = LoggerFactory.getLogger(RouterController.class);
|
|
|
+
|
|
|
+ @ApiOperation(value = "路由接口")
|
|
|
+ @PostMapping(value = "/router")
|
|
|
+ public Result router(@RequestHeader(name = PARAM_APP_KEY) String key,
|
|
|
+ @RequestHeader(name = PARAM_APP_TOKEN) String token,
|
|
|
+ @RequestBody Router router) {
|
|
|
+ //todo
|
|
|
+ log.info("router url:" + router.getUrl());
|
|
|
+ return new Result().success();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|