123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //package com.backendsys.config.Swagger;
- //
- //
- //import io.swagger.v3.oas.models.OpenAPI;
- //import io.swagger.v3.oas.models.info.Info;
- //import org.springframework.context.aspect.Bean;
- //import org.springframework.context.aspect.Configuration;
- //
- //// knife4j 示例配置 及 语法
- //// https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-boot3-demo
- //
- //@Configuration
- //public class SwaggerConfig {
- //
- //// @Bean
- //// public GlobalOpenApiCustomizer globalOpenApiCustomizer() {
- //// return openApi -> {
- //////// if (openApi.getTags()!=null){
- //////// openApi.getTags().forEach(tag -> {
- //////// Map<String,Object> map=new HashMap<>();
- //////// map.put("x-order", RandomUtil.randomInt(0,100));
- //////// tag.setExtensions(map);
- //////// });
- //////// }
- //////// if(openApi.getPaths()!=null){
- //////// openApi.addExtension("x-test123","333");
- //////// openApi.getPaths().addExtension("x-abb",RandomUtil.randomInt(1,100));
- //////// }
- //// };
- //// }
- //
- // private static final String SECURITY_SCHEME_NAME = "BearerAuth";
- //
- // @Bean
- // public OpenAPI openAPI() {
- // return new OpenAPI().info(
- // new Info().title("用户管理系统API")
- // .version("1.0")
- //// .description( "Knife4j集成springdoc-openapi示例")
- //// .termsOfService("http://doc.xiaominfo1.com")
- //// .license(
- //// new License().name("Apache 2.0")
- //// .url("http://doc.xiaominfo2.com")
- //// )
- // );
- // }
- //
- //
- // /**
- // * 分组
- // */
- ////
- //// @Bean
- //// public GroupedOpenApi ApiAuth() {
- //// return GroupedOpenApi.builder()
- //// .group("登录管理")
- //// .pathsToMatch("/api/auth/**")
- //// .build();
- //// }
- ////
- //// @Bean
- //// public GroupedOpenApi ApiUser() {
- //// return GroupedOpenApi.builder()
- //// .group("用户管理")
- //// .pathsToMatch("/api/user/**")
- //// .build();
- //// }
- //
- //}
|