title: I want to ensure MongoDB is available when my Spring Boot server starts
body: <p>I am newer to distributed development and I am attempting to write a web app with the help of Spring Boot and building through Gradle.  Yesterday's goal was to input form data through the web and then, through my REST API, store this form data in a MongoRepository and, finally, bring it back from the repository and display to a new view.  I'm having success with all of this. </p>
  
  <p>As I am thinking ahead, I am realizing I know nothing about how this all works when deploying to "go live" on the web.  </p>
  
  <p>The key piece I am wondering about is what a good (and preferably clean or simplistic) way to get my "mongod" and "mongo" commands to go as part of my web app starting up.  I apologize if the terminology I am using is vague.  I have a main method using Java 7 in my Spring Boot Application (annotated appropriately) which I am currently, to run locally, just asking eclipse to run my app as a Java application and that tells Spring to bring up a local Tomcat server to host my app.  I think I have all that correct in my head, but I am having to manually start my mongo database prior to that by using the CLI for mongo. </p>
  
  <p><strong>Ultimately, how can I automate starting up my mongodb as a part of running my app as a java app?</strong></p>