修改 监控页面链接

master
wangh 2 years ago
parent ee81e14425
commit 4663a6587b

@ -1,6 +1,7 @@
package com.haiwei.web.core.config;
import com.google.common.collect.Ordering;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -24,9 +25,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig
{
/** 是否开启swagger */
public class SwaggerConfig {
/**
* swagger
*/
@Value("${swagger.enabled}")
private boolean enabled;
@ -34,8 +36,7 @@ public class SwaggerConfig
* API
*/
@Bean
public Docket createRestApi()
{
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
// 是否启用Swagger
.enable(enabled)
@ -44,10 +45,11 @@ public class SwaggerConfig
// 设置哪些接口暴露给Swagger展示
.select()
// 扫描所有有注解的api用这种方式更灵活
// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// 扫描指定包中的swagger注解
.apis(RequestHandlerSelectors.basePackage("com.haiwei.web.controller.broad"))
// 扫描所有 .apis(RequestHandlerSelectors.any())
// .apis(RequestHandlerSelectors.basePackage("com.haiwei.web.controller.broad"))
// 扫描所有
// .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
// .operationOrdering(new Ordering<Operation>() {
@ -65,11 +67,11 @@ public class SwaggerConfig
// .operationsSorter(OperationsSorter.ALPHA)
// .build();
// }
/**
*
*/
private ApiInfo apiInfo()
{
private ApiInfo apiInfo() {
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题

@ -3,6 +3,7 @@ package com.haiwei.manage.controller;
import java.util.List;
import com.haiwei.manage.service.IBaseCustomerService;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -48,7 +49,8 @@ public class BsaeFileController extends BaseController
/**
*
*/
@RequiresPermissions("manage:base_file:list")
// @RequiresPermissions("manage:base_file:list")
@ApiOperation(tags = {"文档归档"}, value = "文件-查询")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BsaeFile bsaeFile)
@ -75,6 +77,7 @@ public class BsaeFileController extends BaseController
/**
*
*/
@ApiOperation(tags = {"文档归档"}, value = "文件-添加")
@GetMapping("/add")
public String add(ModelMap mmap)
{
@ -121,7 +124,8 @@ public class BsaeFileController extends BaseController
/**
*
*/
@RequiresPermissions("manage:base_file:remove")
// @RequiresPermissions("manage:base_file:remove")
@ApiOperation(tags = {"文档归档"}, value = "文件删除")
@Log(title = "文档归档", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody

Loading…
Cancel
Save