0
点赞
收藏
分享

微信扫一扫

【Bug】SpringCloudAlibaba整合Swagger时 启动报错

报错

【Bug】SpringCloudAlibaba整合Swagger时 启动报错_swagger

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时,启动时报以上错误。

<!--swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>

【Bug】SpringCloudAlibaba整合Swagger时 启动报错_spring_02

版本是2.7.0 

问题原因

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

解决方案

版本改为:<version>2.9.2</version>


举报

相关推荐

0 条评论