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:

  1. i have opened mongodb server , client, , changed connected database on client side using cmd $mongo mydatabase
  2. postman used test spring boot, things go there, updates go test instead of mydatabase
  3. 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

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -