run pure java programs inside of a spring boot project -


so new spring boot, part of project scrap websites , operations on data scrapped, spring boot rest way expose data
wondering when , can run pure java programs inside of spring boot project, idea came mind call programs inside of class implements commandlinerunner follows :

public class myclass implements commandlinerunner{      private otherclassrepository otherclassrepository;      public myclass ( otherclassrepository otherclassrepository ) {      this.otherclassrepository = otherclassrepository;    }      //do operations , webscrapping programs created in other classes      //guatering data    @override    public void run ( string... strings ) throws exception {      //pass guethered data "otherclass" , expose    } }  

and of course have controllers, repositories , entities. know if way , other ways work.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -