updOneStudent to {POST /stu/updOne}: There is already 'studentController'
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/C:/Users/86152/.m2/repository/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 'studentController' method
public com.baidu.core.core.ServiceResult com.baidu.controller.StudentController.updOneStudent(com.baidu.entity.Student)
to {POST /stu/updOne}: There is already 'studentController' bean method
重点是这句
com.baidu.controller.StudentController.updOneStudent(com.baidu.entity.Student)
to {POST /stu/updOne}: There is already 'studentController' bean method
翻译为:
com.baidu.controller.StudentController.updOneStudent (com.baidu.entity.Student)
到{POST /stu/updOne}:已经有'studentController' bean方法
问题根源就是在controller方法里存在重名的方法,或者请求url
到controller里检查一下改个名字就好
还没有评论,来说两句吧...