◆Version information
MongoDB: MongoDB 5.0 (Standalone)
Java: JDK8
Spring: org.springframework.boot:spring-boot-starter-data-mongodb:2.7.18
◆QA
I am trying to use MongoDB’s transactional features.
I am trying to control transactions using 「@Transactional」annotation, but
The following Exception occurs when running the application.
[Exception]
com.mongodb.MongoClientException: This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.
As a workaround, set the “spring.data.mongodb.uri parameter” in application.properties to
I added “?retryWrites=false” and re-run application.
[My configuration]
spring.data.mongodb.uri=mongodb://localhost:27017/local?retryWrites=false
However, the following exception occurred even when re-run application.
[Exception]
com.mongodb.MongoClientException: This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.
I don’t know what causes this error, can you give me some help