首页 > 其他分享 >TypeNameExtractor could not be found

TypeNameExtractor could not be found

时间:2022-09-28 19:33:39浏览次数:58  
标签:TypeNameExtractor could documentation found swagger schema

TypeNameExtractor could not be foundException

一、注意:

如果项目中使用了 knif4j或swagger

(knif4j内核中就使用了swagger)

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

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

浅析:

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

解决办法:

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

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



标签:TypeNameExtractor,could,documentation,found,swagger,schema
From: https://www.cnblogs.com/exmyth/p/16739329.html

相关文章