I have the following code:
public interface CustomPlanRepository {
void plansUpdate(Query query,Update update,Class classname,String Collection);
}
@Repository
public interface PlanRepository extends MongoRepository<Plan,
Serializable>,CustomPlanRepository{
Plan findById(String id);
}
it throws the following exception during server startup:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'planManagementController': Unsatisfied dependency expressed through field 'planService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'planServiceImpl': Unsatisfied dependency expressed through field 'planRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'planRepository': Invocation of init method failed; nested exception is java.lang.IndexOutOfBoundsException: Index: 0
If I remove this:
void plansUpdate(Query query,Update update,Class classname,String Collection);
the server loads perfectly fine.
How to fix this?