同一个Controller的@RequestMapping指向同一个value会发生什么?
首先,是如下这种写法
|
|
这个应该都知道了,肯定会报错的
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
.