Questions tagged [spring-shell]

Spring Shell is an interactive shell that can be easily extended with commands using a Spring based programming model

Spring Shell's features include

  • A simple, annotation driven, programming model to contribute custom commands
  • Use of Spring Boot auto-configuration functionality as the basis for a command plugin strategy
  • Tab completion, colorisation, and script execution
  • Customisation of command prompt, shell history file name, handling of results and errors
  • Dynamic enablement of commands based on domain specific criteria
  • Integration with the bean validation API
  • Already built-in commands, such as clear screen, gorgeous help, exit
  • ASCII art Tables, with formatting, alignment, fancy borders, etc.

The project homepage can be found at https://projects.spring.io/spring-shell/ while the latest documentation is available at http://docs.spring.io/spring-shell/docs/current/reference/htmlsingle/

108 questions
2
votes
1 answer

Integrating Spring-Shell with the MongoDb driver

Is it me, or are the MongoDb drivers and Spring-Shell deeply incompatible? To start, I'm not talking about the Spring-Data-Mongo stuff, I'm talking about the actual java client that the MongoDb folks put out. My Pom is as follows:
Marcus
  • 166
  • 6
2
votes
1 answer

Change spring-shell.log location

I'm having some trouble with my spring-shell.log. Not a big problem but really annoying. Once I run my application from outside of my workspace, spring shell tries to save the spring-shell.log in a directory which is protected by windows. This…
2
votes
1 answer

How to mask an input string in Spring-Shell

I am using Spring-Shell and I would like to mask the input when typing the password field for a particular method. Looking on the internet and here in the forum, I found many people suggesting to use the console.readPassword() command but, creating…
Daniele
  • 21
  • 3
2
votes
1 answer

Start Spring Scheduled job from Linux Terminal

I have a case where I want to start Spring Scheduled job from Linux Terminal. Is there some way to trigger it from the terminal? For example can I use Spring Shell to start the Scheduled job?
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
2
votes
3 answers

Run Spring Shell 2 without Spring Boot

I already managed to start Spring Shell using Spring Boot: @SpringBootApplication public class Main { public static void main(String[] args) { SpringApplication.run(Main.class); } } All my @ShellComponent classes are detected and I…
Stefan
  • 418
  • 5
  • 13
2
votes
3 answers

Spring Shell - capturing user input in middle of executing ShellMethod

Is the a way to capture user input in middle of executing @ShellMethod. Basically stoping executing of the method to ask for the user input and carrying on after capturing it.
hamid
  • 2,033
  • 4
  • 22
  • 42
2
votes
2 answers

Successor for spring boot integrated java shell ('CRaSH') in Spring Boot 2.0?

As the spring documentation states the crasshd will be removed in spring boot 2.0. What will be the replacement?
ThomasW
  • 475
  • 3
  • 15
2
votes
0 answers

How to reduce spring-shell startup time?

I'm using spring-shell and I want to reduce startup time of the shell. Now it's taking 8-10 seconds and I want it to take less. Do you have any suggestions? By profiling I can see: org.python.util.PythonInterpreter.exec(String) takes ~2…
maya
  • 53
  • 6
2
votes
2 answers

log4j warning on the console

I have my log4j.properties file as below: log4j.rootLogger=WARN, DebugAppender #Debug…
shardul
  • 61
  • 6
2
votes
1 answer

How to run Spring Shell scripts in a JUnit test

I have a Spring Shell-based application and a couple of scripts. Is there an easy way to run the scripts in a JUnit test such that a test fails, if some exception/error occurs during the execution of the script? The purpose of the tests is to make…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
2
votes
1 answer

Return custom exit code in Spring Shell

I am working on a spring-shell application, my @CliCommand methods have custom logic that ends with responses like SUCCESS / FAILURE. I saw that it is possible to modify the spring-shell exit code by throwing an exception (it becomes 1). In case of…
levibo
  • 33
  • 5
2
votes
2 answers

Is it possible to completely mask a password with JLine?

I'm using Spring Shell for a CLI and I want to read a password from the input line. For such purpose spring shell has jline, so using the official documentation [1] of jline it suggests the following: public static void main(String[] args) throws…
Christian Götz
  • 818
  • 1
  • 8
  • 11
2
votes
1 answer

Spring Shell: Startup and shutdown LOGs

I'm quite new on Spring Shell framework. I've built/programmed the Spring Shell using the maven (mvn) repository/tool. It's quite easy to create/add new commands on it. I issue that I have found is around the start up and shutdown of the Spring…
Helio Aymoto
  • 303
  • 2
  • 5
  • 16
1
vote
0 answers

Is there any way to disable denoting command-line options or flags, in Spring Shell when using the '-' character?

I'm creating a console calculator-application of Roman numbers, as a practice, and using Java, Spring Shell 3.1.2. Right now it works correctly with Roman numbers like: calc "V + V" result: X calc "V * V" result: XXV Since Roman numbers have no…
1
vote
1 answer

Viewing all possible Application property values

Where is the best place to look at to find an exhaustive list of Spring Application.properties list? I have looked everywhere but I was unable to find a complete list of possible Spring application.properties list. This link:…