Here is my code - https://github.com/iyngaran/to-do-list
I have UserRepository class in info.iyngaran.core.auth.repository
package and it is annotated with @Repository
.
When I try to inject it in CustomUserDetailsService
class which is in info.iyngaran.core.auth.security
package, I am getting the following error.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customUserDetailsService': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'info.iyngaran.core.auth.repository.UserRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Can somebody help me to find out the issue on this ? Thanks in advance.