Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

required a bean of type 'com.mongodb.Mongo' that could not be found. #6

Open
prakritidev opened this issue Feb 12, 2020 · 0 comments
Open

Comments

@prakritidev
Copy link

Hi,

I tried replicating your work, but it seems not working on my end. Can you help me what is that I'm doing wrong ?

Thanks.

Below is the error Stack

2020-02-12 21:48:37.881  INFO 11634 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2020-02-12 21:48:37.950  INFO 11634 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-02-12 21:48:38.085 ERROR 11634 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method mongoTemplate in com.sclabs.MultiTenantMongoDBTesting.MultiTenantMongoDbTestingApplication required a bean of type 'com.mongodb.Mongo' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)

The following candidates were found but could not be injected:
	- Bean method 'mongo' in 'MongoAutoConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.data.mongodb.MongoDbFactory; SearchStrategy: all) found beans of type 'org.springframework.data.mongodb.MongoDbFactory' multiTenantMongoDbFactory, mongoDbFactory


Action:

Consider revisiting the entries above or defining a bean of type 'com.mongodb.Mongo' in your configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant