Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
Is there any way that we could have our casual Spring-Boot server up and running and run a picocli class for executing certain actions? E.g spring boot up is Dockerized, there is a com.myapp.CliClass (where I want to be able to inject another spring component) and I run an exec from docker like java -cp myjar.jar com.myapp.CliClass. This mostly works but the issue is that I cannot manage the di work since the command is running in another process not being in the same spring context
Is there any way that we could have our casual Spring-Boot server up and running and run a picocli class for executing certain actions? E.g spring boot up is Dockerized, there is a
com.myapp.CliClass
(where I want to be able to inject another spring component) and I run an exec from docker likejava -cp myjar.jar com.myapp.CliClass
. This mostly works but the issue is that I cannot manage the di work since the command is running in another process not being in the same spring context