conflictswithexisting,non-compatiblebeandefinitionofsamenameandcla
(2020-03-01 10:20:04)SpringMVC conflicts with existing, non-compatible bean definition of same name and class 的解决办法,springmvc获取bean
SpringMVC的Controller 应该是采用类似键值对(key/value)的映射方式处理的。而当中的键,默认是用cotroller的类名(非全类名)作为键。这样,如果不同包下面的两个Contoller 重名的话,就会导致SpringMVC的容器管理中的controller map中的key重复了。
解决这个问题也比较简单。
在@Controller
中,使用重名名类名就可以了或者