org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'swagger2Controller': Lookup method resolution failed
时间: 2023-10-14 15:31:50 浏览: 259
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'swagger2Controller': Lookup method resolution failed是一个Spring框架中的异常。这个异常通常发生在Bean的创建过程中,可能是由于依赖问题或配置错误导致的。
根据提供的引用,在网上找到的原因是由于Swagger的问题。可以通过修改依赖来解决这个问题。具体的解决方法是在Maven项目的pom.xml文件中添加相关的依赖,如io.springfox:springfox-swagger2和io.springfox:springfox-swagger-ui,并且确保版本的兼容性。同时,还可以添加com.google.guava:guava依赖来解决FluentIterable.class找不到的问题。另外,如果使用的是高版本的Java,还需要添加javax.xml.bind:jaxb-api依赖。通过这些依赖的添加和配置,可以解决org.springframework.beans.factory.BeanCreationException异常。
需要注意的是,根据提供的引用,在使用Swagger时,还可以通过查看和解压翻译后的API文档来帮助排查和解决问题。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Error creating bean with name ‘appController‘: Lookup method resolution failed; nested exception ...](https://blog.csdn.net/qq_45699990/article/details/128340295)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [spring-beans-5.0.10.RELEASE-API文档-中文版.zip](https://download.csdn.net/download/qq_36462452/85208147)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Error creating bean with name ‘xmlModelPlugin‘: Lookup method resolution failed](https://blog.csdn.net/aiming66/article/details/108074876)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文