mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-20 03:00:53 +08:00
refactor: 拆分接口文档分组配置及 controller 到各自模块
This commit is contained in:
@@ -150,5 +150,11 @@
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-json-jackson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- ContiNew Starter 日志模块 - 拦截器版(Spring Boot Actuator HttpTrace 增强版) -->
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-log-interceptor</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@@ -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