picocli
picocli copied to clipboard
Leverage Spring boot DI with Picocli
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