mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-21 04:57:10 +08:00
refactor: 拆分接口文档分组配置及 controller 到各自模块
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package top.continew.admin.common.config.doc;
|
||||
|
||||
import org.springdoc.core.models.GroupedOpenApi;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 全局接口文档配置
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2025/6/14 21:22
|
||||
*/
|
||||
@Configuration
|
||||
public class GlobalSpringDocConfiguration {
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi allApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("all")
|
||||
.displayName("全部接口")
|
||||
.pathsToMatch("/**")
|
||||
.packagesToExclude("/error")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi commonApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("common")
|
||||
.displayName("通用接口")
|
||||
.pathsToMatch("/common/**")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi monitorApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("monitor")
|
||||
.displayName("系统监控")
|
||||
.pathsToMatch("/monitor/**")
|
||||
.build();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user