ModelAttributeParameterExpander required a bean of type EnumTypeDeterminer that could not be found.


APPLICATION FAILED TO START


Description:

Parameter 2 of constructor in springfox.documentation.spring.web.readers.parameter.ModelAttributeParameterExpander required a bean of type 'springfox.documentation.spi.schema.EnumTypeDeterminer' that could not be found.

Action:

Consider defining a bean of type 'springfox.documentation.spi.schema.EnumTypeDeterminer' in your configuration.

问题背景:
在SpringCloud Alibaba整合swagger2时,启动时报以上错误。

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.7.0</version>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.7.0</version>
    </dependency>

问题原因:
是因为swagger2版本太低导致的问题

解决方案:
版本改为:<version>2.9.2</version>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。