org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/C:/Users/Administrator/.m2/repository/io/springfox/springfox-spring-web/2.7.0/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/C:/Users/Administrator/.m2/repository/io/springfox/springfox-spring-web/2.7.0/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'pmsProductCategoryAttributeController' method
public com.macro.mall.common.api.CommonResult com.macro.mall.controller.PmsProductCategoryAttributeController.delete(java.lang.Long)
to {POST /productCategoryAttr/delete}: There is already 'pmsProductCategoryAttributeController' bean method
public com.macro.mall.common.api.CommonResult com.macro.mall.controller.PmsProductCategoryAttributeController.delete(java.util.List<java.lang.Long>) mapped.
找一下
@RequestMapping(value ="/delete",method = RequestMethod.POST)中的value 路径 是否有重复
Error creating bean with name 'documentationPluginsBootstrapper' defined in URL 解决
最新推荐文章于 2024-04-21 16:51:16 发布
本文探讨了在使用Springfox 2.7.0版本时遇到的依赖冲突问题,特别是关于documentationPluginsBootstrapper和webMvcRequestHandlerProvider的创建失败,以及由此引发的RequestMappingHandlerMapping初始化错误。深入分析了重复映射的根源,即PmsProductCategoryAttributeController中的两个delete方法,它们都映射到了'/productCategoryAttr/delete'路径下,导致了Spring框架的映射冲突。

4336





