异常信息
1 | 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 'brandController' method |
异常原因
1 | 项目下的controller中的Mapping注解有重复[{ 注解}{ 注解}{ 注解}{ 注解}{ 注解}] |
解决方法
1 | 将重复的方法删除即可 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 123!