how to build console command in spring boot web application using spring shell?
<p>I have created restfull web application using spring boot web starter which works well. I am able to access it through urls. </p>

<p>But I have requirement to create console command which can compute and store some values at the backend. I want to be able to run console command manually or through bash script.</p>

<p>I could not find any documentation on how to integrate spring-shell project in spring boot web application. </p>

<p>Also there is no option to choose spring-shell dependency in spring boot starter <a href="https://start.spring.io/">https://start.spring.io/</a> </p>

<p>1) Do webapp and console need to be two separate applications and I need to deploy them separately ? </p>

<p>2) Is it possible to deploy web app and run console commands in the same app ?</p>

<p>3) What is the best approach to share common code (model, services, entities, business logic) between shell and web applications ? </p>

<p>Can anyone please help on this ?</p>