【Java】springboot1.4 swagger2 No matching constant for [0]
@Configuration
@EnableSwagger2
public class Swagger2 {
@Beanpublic Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// .paths(PathSelectors.ant("/**"))
.paths(PathSelectors.any()).build()
.apiInfo(apiInfo());
}
}
如果换成.paths(PathSelectors.ant("/**"))就不会报错,但是无法扫描到API接口
回答
以上是 【Java】springboot1.4 swagger2 No matching constant for [0] 的全部内容, 来源链接: utcz.com/a/87210.html