Menu bars

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 30 April 2017

Pointers for Spring boot + Mongodb applications

Connecting the mongodb database to spring boot is very important and powerful. The most easy way to persist your application data is to store it somewhere. We all do it by storing it into some kind of databases. In these types of databases i found out that mongodb is very easy to handle and configure as it is schema-less. So i dont need to create any sort of database design instead i can send my json file for saving it and i can retrieve it back.

First of all, lets look into some basic links that needed.

1a. Install mongodb on ubuntu 16.04 - Link
1b. Install mongodb on windows 7 -  Link

2. You can use mongo command to see the CLI of mongo instance that is running, a few basic         commands as follows.
    - show dbs
    - show collections
    - db.{collection_name}.find()

If you want to understand how MongoDB can be used in spring boot then this link will give you a good idea to do it.  In this article you can see that there are two types of connection that can be used to connect to mongodb and i found out that mongotemplate is having much more flexibility.

More complex mongoTemplate queries can be made by following this article.


============================== References==================================
It is a good starting point for starting spring boot applications. It follows very good design patterns to follow. Check here

You might also need to get some of the annotations that are needs to be used. check this