我有以下代码:
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);
}
在服务器启动期间,它会抛出以下异常:
org.springframework.beans.factory.UnsatisfiedDependencyException: 创建bean“planManagementController”时出错:无法满足field“planService”的依赖关系;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 创建bean“planServiceImpl”时出现不满意的依赖项;无法满足field“planRepository”的依赖性;嵌套异常是 org.springframework.beans.factory.BeanCreationException: 创建bean“planRepository”时出错:“init”方法的调用失败; 嵌套异常是java.lang.IndexOutOfBoundsException:Index:0
如果我去掉这段内容:
void plansUpdate(Query query,Update update,Class classname,String Collection);
服务器完全正常。
如何解决这个问题?