?這是我出現(xiàn)的錯誤:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in springfox.documentation.swagger.schema.ApiModelPropertyPropertyBuilder required a bean of type 'springfox.documentation.spring.web.DescriptionResolver' that could not be found.
Action:
Consider defining a bean of type 'springfox.documentation.spring.web.DescriptionResolver' in your configuration.
這是項目導(dǎo)入的依賴關(guān)系:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
????????因為我要建立的是微服務(wù)的項目,需要建立許多模塊,以至于我在父工程中引入了當(dāng)前模塊,然后我在子模塊中又引入了當(dāng)前模塊,造成了沖突。
????????另外一種解決方法是,經(jīng)過上網(wǎng)查證,可能由于Spring Boot和Swagger版本的問題,Spring Boot2.6以上的版本,需要使用到Swagger的版本是2.9.7,而且引入的兩個版本要是相同的。文章來源:http://www.zghlxwxcb.cn/news/detail-661176.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-661176.html
? ? ? ? 如果您感覺對您有幫助,歡迎關(guān)注我一下,謝謝。
到了這里,關(guān)于Spring Boot 整合 Swagger2 糾錯的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!