org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
2017-09-23 17:50
591 查看
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation
of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'AaController' bean method public void com.aaa.controller.AaController.update(java.lang.Long,java.lang.String)
代码:
@RequestMapping(value="update",method=RequestMethod.POST)
@ResponseBody
public void delete(Long parentId,Long id){
}
页面请求路径:http://manager.com//delete
问题:创建bean时异常,通过标出的异常发现,注解中写的value的值与页面的url不一致
修改:
@RequestMapping(value="delete",method=RequestMethod.POST)
@ResponseBody
public void delete(Long parentId,Long id){
}
修改之后再启动就不报错了;
一定要心细!!!!
of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'AaController' bean method public void com.aaa.controller.AaController.update(java.lang.Long,java.lang.String)
代码:
@RequestMapping(value="update",method=RequestMethod.POST)
@ResponseBody
public void delete(Long parentId,Long id){
}
页面请求路径:http://manager.com//delete
问题:创建bean时异常,通过标出的异常发现,注解中写的value的值与页面的url不一致
修改:
@RequestMapping(value="delete",method=RequestMethod.POST)
@ResponseBody
public void delete(Long parentId,Long id){
}
修改之后再启动就不报错了;
一定要心细!!!!
相关文章推荐
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Can
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginAction‘
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fetchControl
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name解决方案
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManage
- 关于org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFac
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFa
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContex
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SystControl'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseDAOFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***'