- Place your Cloudant credential in the property file:
src/main/resources/application.properties
- Start Spring-boot as usual:
mvn spring-boot:run
- Saving data to DB but hitting the URL: http://localhost:8080/save
- Then check the data in your Cloudant account, it should save your pet data to a DB instance called 'myDB'
You may want to use a local CouchDB instance instead, the easiest way to do this is to use Docker
docker run -ti --rm -p 5984:5984 klaemo/couchdb
(See CouchDB Docker guide)
- Once you have CouchDB running locally, you can just fire up the 'local' SpringBoot profile:
mvn spring-boot:run -Dspring.profiles.active=local
- Saving data to DB by hitting the URL: http://localhost:8080/save
- Check your CouchDB instance for the saved data, this is available at: http://localhost:5984/_utils/database.html?mydb