SwaggerConfig配置类1234567891011121314151617181920@Configuration@EnableSwagger2public class SwaggerConfig { @Bean public Docket createRestApi(){ return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()).build(); } private ApiInfo apiInfo(){ return new ApiInfoBuilder() .title("熹烨网络小说分析系统管理API") .description("熹烨网络小说分析系统的API文档.") .version("1.0") .build(); }} 然后访问localhost:9090/swagger-ui.html