Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am very new to Spring boot and I have to build an API for a coursework. I started the project from Spring initializer and went through your tutorial. the findOne() method was showing an error. i found out that the newer versions of spring-boot-starter-parent releases(what I downloaded was 2.0.2 version and yours is for 1.5.8) shows an error for the findOne method. I am going with the 1.5.8 version for now, but what should I do in the newer versions to use the findOne method??
- Althaf Nawshad
Great article Shubham. It’s quite useful for people who want to start learning MongoDB and SpringBoot.
- ddubey
UserRepository findOne(String UserID) method is not available with spring.
- Tainoor Bashir Manyar
Please include the filename along with code snippet. How will anyone understand where to add the code. And please do this for all tutorials. All tutorials on this website have the same problem
- Ram Kumar
UserRepository findOne(String UserID) method is not available with spring.
- Gokul
What would be the mongo db configurations if mongodb is run in a docker container?
- Shakthi Manai
Hi Sir , I am implement mongo very well and everything working fine but i have one question i want to run project spring boot with mongoDb but how to connection pooling like maximum-pool-size, max-lifetime, idle-timeout and if i am type wrong mongo password in application properties yet connect mongoDb how is possible . Please give the solution
- shivam awasthi
I started learning integrating sprint boot with mongodb and just followed the same steps as given in the document and I also went through the comments to check out if I am missing anything, however when I hit GET API call I get this error Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName=‘root’, source=‘admin’, password=, mechanismProperties={}}; nested exception is com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName=‘root’, source=‘admin’, password=, mechanismProperties={}}", I am able to login to mongo shell and see the user is created here are my mongodb properties I have defined spring.data.mongodb.authentication-database=admin spring.data.mongodb.username=root spring.data.mongodb.password=root spring.data.mongodb.database=user_db spring.data.mongodb.port=27018 spring.data.mongodb.host=localhost authenticationMechanism=SCRAM-SHA-1 I also see below application logs com.mongodb.MongoCommandException: Command failed with error 18 (AuthenticationFailed): ‘Authentication failed.’ on server localhost:27018. The full response is { “ok” : 0.0, “errmsg” : “Authentication failed.”, “code” : 18, “codeName” : “AuthenticationFailed” } Can anyone help here?
- Yatheesh