One possible reason is that there are two classes (e.g. HomeController) with the same name but in different packages or multiple instances for one class, both of them will use the default name (e.g. homeController), and then an exception happens.
If this is the case, then @Component(beanName) + @Qualifier(beanName) would be a possible solution.