jakarta-eespring-shell

How to create a CLI like Spring Shell in Java EE application without spring framework?


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?


Solution

  • 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.