首页>代码>基于SpringBoot学生就业管理系统(带万字文档)>/源代码/employment/src/main/java/com/project/config/SwaggerConfig.java
package com.project.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @Author: liangrenren
 * @Date: 21:51 2021/2/18
 * @Description:
 * @Version v1.0
 */

@Configuration
@EnableSwagger2
public class SwaggerConfig {
    @Bean
    public Docket createRestApi() {
        return new Docket(DocumentationType.SWAGGER_2)
                .pathMapping("/")
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.project.controller"))
                .paths(PathSelectors.any())
                .build().apiInfo(new ApiInfoBuilder()
                        .title("SpringBoot整合Swagger")
                        .description("SpringBoot整合Swagger,详细信息......")
                        .version("9.0")
                        .contact(new Contact("啊啊啊啊","blog.csdn.net","aaa@gmail.com"))
                        .license("The Apache License")
                        .licenseUrl("http://www.baidu.com")
                        .build());
    }
}
最近下载更多
11999333  LV3 6月9日
newhaijun  LV16 6月7日
haitianjiaoyu0  LV8 5月27日
5418888  LV3 5月13日
陈小灏  LV18 2月21日
蓝羊羊  LV20 2月15日
lxllxllxlLXL  LV1 2024年12月26日
微信网友_7289626841501696  LV4 2024年12月24日
1121173448  LV2 2024年12月18日
最近浏览更多
酷酷的轲  LV10 8月26日
38735466  LV11 8月18日
3127785664  LV2 8月15日
康日澜  LV10 8月2日
ddman9009  LV25 7月4日
limufu  LV1 6月17日
krispeng  LV15 6月15日
潜心小白来到  LV3 6月10日
11999333  LV3 6月9日
zhangyuhong123 6月8日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友