java - How to pass REST API data into a specific database in mongodb while now everything goes to test by default? -
i using spring boot implement rest api connected mongodb. however, data updates passed default database called test. have done these:
- i have opened mongodb server , client, , changed connected database on client side using cmd $mongo mydatabase
- postman used test spring boot, things go there, updates go test instead of mydatabase
- i cannot find bean file, in suppose configuration changes should made?
thank much!
as can understand need specify different database name. can done using common application properties. refer http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
add
spring.data.mongodb.database=test # database name
in application.properties file
Comments
Post a Comment