【发布时间】:2019-09-09 23:22:24
【问题描述】:
如何在swagger-ui.html前添加默认参数
像这样:
http://localhost:8080/api/swagger-ui.html
到目前为止我已经集成的内容:
Pom.xml:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
SwaggerConfig.java:
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
}
Do I have to map "swagger-ui.html" to something with @RequestMapping?
【问题讨论】:
标签: spring-boot swagger-ui request-mapping