(knif4j内核中就使用了swagger)

项目启动时可能就会出现下边的异常

DynamicResponseModelReader required a bean of type 'springfox.documentation.schema.TypeNameExtractor' that could not be found.

大概在说TypeNameExtractor类缺失(应该用@ComponentScan去扫描这些类)

解决办法:

可以给主启动类上添加下边的注解(用于扫描缺失的这些类)

@ComponentScan({"springfox.documentation.schema"})