Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage Spring boot DI with Picocli #2312

Open
gilamarko opened this issue Jun 27, 2024 · 1 comment
Open

Leverage Spring boot DI with Picocli #2312

gilamarko opened this issue Jun 27, 2024 · 1 comment
Labels
theme: integration An issue or change related to integration with other frameworks, shells or operating systems

Comments

@gilamarko
Copy link

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

@remkop
Copy link
Owner

remkop commented Jul 12, 2024

Hi @gilamarko have you had a chance to look at this?
https://github.com/remkop/picocli/tree/main/picocli-spring-boot-starter

@remkop remkop added the theme: integration An issue or change related to integration with other frameworks, shells or operating systems label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: integration An issue or change related to integration with other frameworks, shells or operating systems
Projects
None yet
Development

No branches or pull requests

2 participants