In my java project, I have 2 entities with same name but different package, also I have corresponding dao for these entities.
Now because of 2 entities with same name, it was giving duplicate scan error, and so I added name attribute to these entities with their fully qualified name.
Ex: Entity(name="p.c.k.Entity) & Entity(name="p.a.b.Entity)
But now I their corresponding daos are not able to autowire, and I am getting the following error:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type...
Do I have to change anything in Dao also to support this "name" attribute change in the entity.
I am using Hibernate, JPA and Spring.