org.springframework.beans.factory.UnsatisfiedDependencyException

Hello Everying,

I have imported mflix project in intelji IDE. While running application im getting org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘movieController’: Unsatisfied dependency expressed through field ‘moviesService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘moviesService’: Unsatisfied dependency expressed through field ‘movieDao’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘movieDao’ defined in file [C:\Users\mohshai3\Documents\mflix\target\classes\mflix\api\daos\MovieDao.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘mongoClient’ defined in class path resource [mflix/config/MongoDBConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method ‘mongoClient’ threw exception; nested exception is java.lang.IllegalArgumentException: An SRV host name ‘YOUR_CLUSTER_URI’ was provided that does not contain at least three parts. It must contain a hostname, domain name and a top level domain error.

Can someone help me on this issue. Appreciated your help.

Thanks and regards,
Shafi

com.mongodb.client.MongoClient]: Factory method ‘mongoClient’ threw exception; nested exception is java.lang.IllegalArgumentException: An SRV host name ‘YOUR_CLUSTER_URI’ was provided that does not contain at least three parts. It must contain a hostname, domain name and a top level domain error.

looks like you need to set your spring.mongodb.uri (in application.properties)

yes , Thanks for the help Vladimir