spring boot 整合Swagger2

@Configuration
@EnableSwagger2
public class SwaggerConfig {
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select()
				.apis(RequestHandlerSelectors.basePackage("report.controller"))
				.paths(PathSelectors.any()).build();
	}
}


NOTE
使用fastjson序列化的话,fastjson版本要做1.2.10以上

猜你喜欢

转载自xl822786603.iteye.com/blog/2344009