swagger for bonus-auth
This commit is contained in:
parent
b518062559
commit
57616bce02
|
|
@ -62,6 +62,17 @@
|
||||||
<groupId>com.bonus</groupId>
|
<groupId>com.bonus</groupId>
|
||||||
<artifactId>bonus-common-log</artifactId>
|
<artifactId>bonus-common-log</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- Swagger UI -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${swagger.fox.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- bonus Common Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.bonus</groupId>
|
||||||
|
<artifactId>bonus-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.auth;
|
package com.bonus.auth;
|
||||||
|
|
||||||
|
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
|
@ -10,6 +11,7 @@ import com.bonus.common.security.annotation.EnableRyFeignClients;
|
||||||
*
|
*
|
||||||
* @author bonus
|
* @author bonus
|
||||||
*/
|
*/
|
||||||
|
@EnableCustomSwagger2
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||||
public class BonusAuthApplication
|
public class BonusAuthApplication
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class SwaggerProvider implements SwaggerResourcesProvider, WebFluxConfigu
|
||||||
.contains(routeDefinition.getId()))
|
.contains(routeDefinition.getId()))
|
||||||
.forEach(routeDefinition -> routeDefinition.getPredicates().stream()
|
.forEach(routeDefinition -> routeDefinition.getPredicates().stream()
|
||||||
.filter(predicateDefinition -> "Path".equalsIgnoreCase(predicateDefinition.getName()))
|
.filter(predicateDefinition -> "Path".equalsIgnoreCase(predicateDefinition.getName()))
|
||||||
.filter(predicateDefinition -> !"bonus-auth".equalsIgnoreCase(routeDefinition.getId()))
|
// .filter(predicateDefinition -> !"bonus-auth".equalsIgnoreCase(routeDefinition.getId()))
|
||||||
.forEach(predicateDefinition -> resourceList
|
.forEach(predicateDefinition -> resourceList
|
||||||
.add(swaggerResource(routeDefinition.getId(), predicateDefinition.getArgs()
|
.add(swaggerResource(routeDefinition.getId(), predicateDefinition.getArgs()
|
||||||
.get(NameUtils.GENERATED_NAME_PREFIX + "0").replace("/**", SWAGGER2URL)))));
|
.get(NameUtils.GENERATED_NAME_PREFIX + "0").replace("/**", SWAGGER2URL)))));
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.bonus.common.log.annotation.SysLog;
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
@ -42,9 +46,17 @@ public class SysConfigController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 获取参数配置列表
|
* 获取参数配置列表
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// @ApiOperation("获取参数配置列表")
|
||||||
@RequiresPermissions("system:config:list")
|
@RequiresPermissions("system:config:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@SysLog(title = "参数配置", businessType = OperaType.QUERY,logType = 0,module = "系统管理->参数配置")
|
@SysLog(title = "参数配置", businessType = OperaType.QUERY,logType = 0,module = "系统管理->参数配置")
|
||||||
|
// @ApiResponses(value = {
|
||||||
|
// @ApiResponse(code = 200, message = "成功", response = TableDataInfo.class),
|
||||||
|
// @ApiResponse(code = 400, message = "无效的ID"),
|
||||||
|
// @ApiResponse(code = 404, message = "未找到用户")
|
||||||
|
// })
|
||||||
public TableDataInfo list(SysConfig config) {
|
public TableDataInfo list(SysConfig config) {
|
||||||
try{
|
try{
|
||||||
startPage();
|
startPage();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue