mirror of
https://gitee.com/freshday/radar.git
synced 2025-12-26 07:16:26 +08:00
prefs: engine 端增加系统启动默认页,增加友好提示。
Signed-off-by: feihu.wang <wfh45678@163.com>
This commit is contained in:
parent
771a7d1e6e
commit
8eb85cd05e
@ -21,7 +21,7 @@ public class SwaggerConfig {
|
||||
.apiInfo(buildApiInf())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.pgmmers.radar.controller"))
|
||||
.paths(PathSelectors.any())
|
||||
.paths(PathSelectors.regex("/services/.*"))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package com.pgmmers.radar.controller;
|
||||
|
||||
import com.pgmmers.radar.service.common.CommonResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* engine 启动首页.
|
||||
* @author wangfeihu
|
||||
*/
|
||||
@RestController
|
||||
public class IndexController {
|
||||
|
||||
@GetMapping(value = {"/", ""})
|
||||
public CommonResult index(HttpServletRequest request) {
|
||||
CommonResult result = new CommonResult(Boolean.TRUE, "100", "Engine is running");
|
||||
result.getData().put("swagger url:", request.getRequestURL() + "swagger-ui.html");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -58,6 +58,17 @@ public class CommonResult implements Serializable{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
|
||||
public CommonResult () {
|
||||
|
||||
}
|
||||
|
||||
public CommonResult(boolean success, String code, String msg) {
|
||||
this.success = success;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CommonResult [success=" + success + ", msg=" + msg + ", code=" + code + "]";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user