springboot swagger 不显示接口的问题

@Bean
	public Docket createRestApi() {
		return new Docket(DocumentationType.SWAGGER_2)
				.apiInfo(apiInfo())
				.select()
				//此包路径下的类,才生成接口文档
				.apis(RequestHandlerSelectors.basePackage("org.jeecg"))
				//加了ApiOperation注解的类,才生成接口文档
	            .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
				.paths(PathSelectors.any())
				.build()
				.securitySchemes(Collections.singletonList(securityScheme()));
				//.globalOperationParameters(setHeaderToken());
	}

注意://此包路径下的类,才生成接口文档
            .apis(RequestHandlerSelectors.basePackage("org.jeecg"))

你可能感兴趣的:(笔记)