I have the same problem as here, with the difference that my import is correct and it's still not working. I have this class:
@Service
public class UserServiceDB {
@Autowired
private ApplicationUserRepository userRepository;
// ....
}
And the ApplicationUserRepository interface:
@Repository
public interface ApplicationUserRepository extends JpaRepository<ApplicationUser, Long> {
ApplicationUser findByUsername(String username);
}
When I run my app, it gives me the following error:
Description:
Field userRepository in auth.user.UserServiceDB required a bean of type 'auth.user.ApplicationUserRepository' that could not be found.Action:
Consider defining a bean of type 'auth.user.ApplicationUserRepository' in your configuration.
I have no clue what to change...