Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creatin

Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'teacherController' bean method 


Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'teacherController' bean method 

在修改了数据库表和表关联后,相应的后台也要跟着改变,但是一直会报这个错误,说bean注入失败,找了好久才发现是命名重复了,就是@RequestMapping(value = { "###" })

和另一个控制器的命名相同发生冲突,特地写下来,警示复制有风险。

你可能感兴趣的:(java,web)