打开网页报错:
Ambiguous mapping. Cannot map 'handController' method
public com.smallchill.core.toolbox.ajax.AjaxResult com.smallchill.smtlamp.controller.HandController.AC2off(java.lang.String)
to {[/hand/AC1off]}: There is already 'handController' bean method
public com.smallchill.core.toolbox.ajax.AjaxResult com.smallchill.smtlamp.controller.HandController.AC1off(java.lang.String) mapped.
解决办法:
@RequestMapping()中的url重复了,修改为不同的url即可;
本文介绍了在使用Spring MVC框架时遇到的URL映射冲突问题及其解决办法。具体表现为两个方法映射到了相同的URL路径上,导致系统无法区分调用哪个方法。解决方式是通过调整@RequestMapping注解中的URL值来避免重复。
877

被折叠的 条评论
为什么被折叠?



