首页 > 其他 > 详细

controller中路径重复导致启动异常

时间:2020-09-04 15:14:05      阅读:118      评论:0      收藏:0      [点我收藏+]

添加接口后,启动报错

2020-09-04 10:35:35,370] [WARN] [] org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘documentationPluginsBootstrapper‘ defined in URL [jar:file:/Users/fred-zhang/Documents/project/repo/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.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:/Users/fred/Documents/project/repo/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 1; 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 ‘serverInfoController‘ method 
public ResultInfo<java.util.List<AvailavleBuyIpListResponse>> ServerInfoController.vpcIpList(java.lang.Integer,java.lang.Integer)
to {[/resource/vpc/iplist/{client_id}],methods=[GET],produces=[application/json;charset=UTF-8]}: There is already ‘serverInfoController‘ bean method
publicResultInfo<VpcIpResponse> ServerInfoController.zoneUserLanServerList(java.lang.Integer,java.lang.String,java.lang.Integer) mapped

提示比较明显, 映射出现 不确定性,路径有重复。

controller中路径重复导致启动异常

原文:https://www.cnblogs.com/idea-persistence/p/13613339.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!