close

[Solved] Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException in java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error Occurs?

Today I get the following error Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException in java.

How To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error ?

  1. How To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error ?

    To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error Doctor findByDoctorId(... void deleteByDoctorId(...
    or change doctorId to simply id, with getter and setter.

  2. Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException

    To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error Doctor findByDoctorId(... void deleteByDoctorId(...
    or change doctorId to simply id, with getter and setter.

Solution 1

The Id of Doctor is doctorId, so

 Doctor findById(...
 void deleteById(...

should be

Doctor findByDoctorId(...
void deleteByDoctorId(...

or change doctorId to simply id, with getter and setter.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment