title: Java Spring Boot MVC and CLI API in the same project
body: <p>Java Spring Boot MVC and CLI API in the same project</p>
  
  <p>I have implemented a web app using Spring Boot MVC and I now I need to add an API whose functions can be called from a cronjob. 
  I would like to use Entity and Repository classes implemented in my Web app. I was thinking about creating a new main class which implements 
  CommandLineRunner interface and then create separate JARS for Web and CLI applications and run them independently. Is this a good approach?
  Do you have any suggestion about the architecture?</p>
  
  <p>Thanks </p>