title: Spring Boot Data console application
body: <p>I'm gonna create a Java console application for accessesing a database (MySQL). I'm gonna use Spring Boot/Spring Data JPA. What is the correct way to create a console application using Spring Boot?</p>
  <p>I found a few ways to do this:</p>
  <ul>
  <li><code>spring.main.web-application-type=NONE</code> (in application.properties)</li>
  <li><code>spring.main.web-environment = false</code> (in application.properties)</li>
  <li>using the Spring Shell project</li>
  <li>implementing the <code>CommandLineRunner</code> interface</li>
  </ul>
  <p>I suppose that some of them may be obsolete, have pros and cons. Could you please explain how to create a plain console application using Spring Boot/Spring Data?</p>