I used Spring shell in my project, which works very well.
Now we have a Java EE project on the JBoss application server. I would like to have a good CLI, just like the Spring shell. How can this be done?
I used Spring shell in my project, which works very well.
Now we have a Java EE project on the JBoss application server. I would like to have a good CLI, just like the Spring shell. How can this be done?
I would expose all the JBoss services API via REST, using Swagger. Then generate the swagger.json and import it in Swagger Editor, generate automatically the Java client and invoke it from the Spring Shell client. I know it's a bit roundaboutish, but unfortunately as now I am not aware of how to integrate Spring Shell in a Java EE application. You can even automate the generation of the Java Client https://www.baeldung.com/spring-boot-rest-client-swagger-codegen
As far as I understand your request, Spring Shell is not meant for this. Spring Shell is somewhat tied to running in an actual terminal, leveraging JLine. Another implementation could be written (similar to the "running in IDE" approach) that scans for MethodTargets and runs them, taking input from your (custom) webapp.
Maybe http://www.crashub.org/ is more tailored to what you're asking for.