Skip to main content

All Questions

Tagged with
-1 votes
1 answer
28 views

Error with SRV Host Name in Spring Boot MongoDB Configuration using .env file

I am referring to this video: Spring Boot + MongoDB | Crash Course While storing the information about the URI in a .env file, it's giving the following error: An SRV host name '${env.MONGO_CLUSTER}' ...
Alok Marathe's user avatar
1 vote
2 answers
112 views

ConfigurationProperties read on startup, but show null when Bean accessed

Storing all my Mongo properties in an external application.properties files and reading them with the provided classes. I'm using them in a bean to build DatabaseFactory objects, but they read null ...
rainydaymatt's user avatar
0 votes
0 answers
36 views

How to make spring.data.mongodb.password have an optional value in Spring's application.propertties?

I have a Spring Boot 3.3 application that accesses a MongoDB service. The application is deployed as a Container image to various stages. At some stages, using a username / password to connect to ...
Christoph Dahlen's user avatar
0 votes
0 answers
41 views

Issue migrating from MongoDB to PostgreSQL in Spring Boot

I am working on migrating entity from MongoDB to PostgreSQLand currently there is an issue when migrating field private RentingConfiguration renting; The Entity for MongoDB: @Document(collection = &...
Kenan Džafić's user avatar
0 votes
0 answers
81 views

How to configure mongodb with .pem file as certificate in springboot?

I've tried few options connecting to mongodb using SSL with .pem file as certificate and facing issue from local. Below is the code snippet of my local: import com.mongodb.Block; import com.mongodb....
Nani's user avatar
  • 65
0 votes
1 answer
32 views

Using LocalDateTime in Java Spring framework, still gives Date,parse() error for MongoDb collection

I want to generate a listing report based on "listing status" and "createdOn" date on the MongoDB collection"processing-status". The "listingStatus" field ...
Arti M's user avatar
  • 21
0 votes
1 answer
93 views

Cannot seem to disable Spring Boot automatic localhost connection attempt

I'm working on a Spring Boot API to connect to a Mongo instance hosted on the Atlas platform; I have tested it locally with the SpringApplication.run process running and, later during debugging, only ...
rainydaymatt's user avatar
-1 votes
1 answer
36 views

Java (Spring) / MongoDB: If-Conditional set() Function

I want to modify my MongoDB through Java with the Springframework (no other). In MongoDB it should look like this: Documents.update( {some_condition: true, "some field": "some ...
Marcel's user avatar
  • 11
0 votes
0 answers
31 views

My project stopped adding, updating and deleting (Spring + MongoDB)

I have a project using SpringBoot and MongoDB. At some point it stopped working and is showing the following logs: 2024-05-22T11:50:26.046-03:00 2024-05-22T11:50:26.048-03:00 2024-05-22T11:50:26.075-...
JoseNetinho's user avatar
1 vote
0 answers
396 views

"module java.base does not "opens java.nio.charset" to unnamed module" in new Spring resource

So, I am building out architecture for user functionality in a new app, written in Java 17 and Spring Boot 3.2.5. I'm consistently getting error logs containing the message above. Here is the domain ...
rainydaymatt's user avatar
0 votes
0 answers
23 views

The method save(Iterable<S>) in the type MongoRepository<Blog,String> is not applicable for the arguments (Blog)

After following a lot of online articles about starting up a CRUD app with Java/Mongo, I am seeing this error. I did a lot of iterations, but cannot figured it out... Blog Model import lombok....
flat's user avatar
  • 1
2 votes
2 answers
76 views

Type Mapping - Spring Data MongoDB

We have the use case that we’re storing deeply nested objects in MongoDB. Certain fields in this object can have different types. For instance let’s say an object can have a field that’s a collection ...
Ranil Wijeyratne's user avatar
0 votes
1 answer
38 views

How to set CreatedBy and setLastModifiedBy fields automaticaly within MongoDB

i currently have this issue while working on a Spring Boot project. i have a project entity that have this fields (CreatedBy and setLastModifiedBy), using the MongoDB EnableMongoAuditing annotation i ...
Aymen Maamri's user avatar
0 votes
0 answers
59 views

The import com.mongodb cannot be resolved - Gradle (Kotlin) -

import static com.mongodb.client.model.Filters.eq; import org.bson.Document; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; ...
flat's user avatar
  • 1
-1 votes
1 answer
81 views

What's the proper string to provide a Mongo ServerAddress for an Atlas database?

I'm trying to connect my Spring Boot API to a Mongo database in Atlas, and configuring the Client like so: @Override public void configureClientSettings(MongoClientSettings.Builder builder) { ...
rainydaymatt's user avatar

15 30 50 per page
1
2 3 4 5
219