feat: 替换swagger2为OpenAPI3
This commit is contained in:
+4
-2
@@ -1,7 +1,8 @@
|
||||
package com.central.log.controller;
|
||||
|
||||
import com.central.search.client.service.IQueryService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -14,12 +15,13 @@ import java.util.Map;
|
||||
* @author zlt
|
||||
* @date 2019/5/8
|
||||
*/
|
||||
@Tag(name = "访问统计")
|
||||
@RestController
|
||||
public class AggregationController {
|
||||
@Autowired
|
||||
private IQueryService queryService;
|
||||
|
||||
@ApiOperation(value = "访问统计")
|
||||
@Operation(summary = "访问统计")
|
||||
@GetMapping(value = "/requestStat")
|
||||
public Map<String, Object> requestStatAgg() {
|
||||
return queryService.requestStatAgg("point-log-*","request-statistics");
|
||||
|
||||
+4
-9
@@ -4,9 +4,8 @@ import com.central.common.model.PageResult;
|
||||
import com.central.search.client.service.IQueryService;
|
||||
import com.central.search.model.SearchDto;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -19,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* Blog: http://zlt2000.gitee.io
|
||||
* Github: https://github.com/zlt2000
|
||||
*/
|
||||
@Tag(name = "审计日志")
|
||||
@RestController
|
||||
public class AuditLogController {
|
||||
private final IQueryService queryService;
|
||||
@@ -27,12 +27,7 @@ public class AuditLogController {
|
||||
this.queryService = queryService;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "审计日志全文搜索列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "分页起始位置", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "queryStr", value = "搜索关键字", dataType = "String")
|
||||
})
|
||||
@Operation(summary = "审计日志全文搜索列表")
|
||||
@GetMapping(value = "/auditLog")
|
||||
public PageResult<JsonNode> getPage(SearchDto searchDto) {
|
||||
searchDto.setIsHighlighter(true);
|
||||
|
||||
+4
-9
@@ -4,9 +4,8 @@ import com.central.common.model.PageResult;
|
||||
import com.central.search.client.service.IQueryService;
|
||||
import com.central.search.model.SearchDto;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -16,17 +15,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*
|
||||
* @author zlt
|
||||
*/
|
||||
@Tag(name = "慢查询日志")
|
||||
@RestController
|
||||
public class SlowQueryLogController {
|
||||
@Autowired
|
||||
private IQueryService queryService;
|
||||
|
||||
@ApiOperation(value = "慢sql日志全文搜索列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "分页起始位置", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "queryStr", value = "搜索关键字", dataType = "String")
|
||||
})
|
||||
@Operation(summary = "慢sql日志全文搜索列表")
|
||||
@GetMapping(value = "/slowQueryLog")
|
||||
public PageResult<JsonNode> getPage(SearchDto searchDto) {
|
||||
searchDto.setIsHighlighter(true);
|
||||
|
||||
+5
-19
@@ -6,9 +6,8 @@ import com.central.log.service.TraceLogService;
|
||||
import com.central.search.client.service.IQueryService;
|
||||
import com.central.search.model.SearchDto;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -20,6 +19,7 @@ import java.util.*;
|
||||
*
|
||||
* @author zlt
|
||||
*/
|
||||
@Tag(name = "系统日志")
|
||||
@RestController
|
||||
public class SysLogController {
|
||||
/**
|
||||
@@ -33,27 +33,13 @@ public class SysLogController {
|
||||
@Resource
|
||||
private TraceLogService traceLogService;
|
||||
|
||||
@ApiOperation(value = "系统日志全文搜索列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "分页起始位置", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "queryStr", value = "搜索关键字", dataType = "String"),
|
||||
@ApiImplicitParam(name = "sortCol", value = "排序字段", dataType = "String"),
|
||||
@ApiImplicitParam(name = "sortOrder", value = "排序顺序", dataType = "String"),
|
||||
@ApiImplicitParam(name = "isHighlighter", value = "是否显示高亮", dataType = "String")
|
||||
})
|
||||
@Operation(summary = "系统日志全文搜索列表")
|
||||
@GetMapping(value = "/sysLog")
|
||||
public PageResult<JsonNode> sysLog(SearchDto searchDto) {
|
||||
return queryService.strQuery(SYS_LOG_INDEXNAME, searchDto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "系统日志链路列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "queryStr", value = "搜索关键字", dataType = "String"),
|
||||
@ApiImplicitParam(name = "sortCol", value = "排序字段", dataType = "String"),
|
||||
@ApiImplicitParam(name = "sortOrder", value = "排序顺序", dataType = "String"),
|
||||
@ApiImplicitParam(name = "isHighlighter", value = "是否显示高亮", dataType = "String")
|
||||
})
|
||||
@Operation(summary = "系统日志链路列表")
|
||||
@GetMapping(value = "/traceLog")
|
||||
public PageResult<TraceLog> traceLog(SearchDto searchDto) {
|
||||
PageResult<JsonNode> pageResult = queryService.strQuery(SYS_LOG_INDEXNAME, searchDto);
|
||||
|
||||
Reference in New Issue
Block a user