zoukankan      html  css  js  c++  java
  • controller中路径重复导致启动异常

    添加接口后,启动报错

    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
    
    

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

  • 相关阅读:
    BF算法和KMP算法
    Python课程笔记 (五)
    0268. Missing Number (E)
    0009. Palindrome Number (E)
    0008. String to Integer (atoi) (M)
    0213. House Robber II (M)
    0198. House Robber (E)
    0187. Repeated DNA Sequences (M)
    0007. Reverse Integer (E)
    0006. ZigZag Conversion (M)
  • 原文地址:https://www.cnblogs.com/idea-persistence/p/13613339.html
Copyright © 2011-2022 走看看