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
Post a Comment