Questions tagged [spring-shell]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

How to enable always interactive mode for spring-shell command prompt

My requirement is to execute spring-shell program with my-command as a first command then application should prompt again in interactive mode for next command. Ex:- $ $JAVA_HOME/bin/java -jar demo-0.0....
manish kumar's user avatar
0 votes
1 answer
38 views

Run Spring Shell Command after starte Docker Image

I use a Github Action to start a Spring Boot image on a vServer. This Spring Boot application contains the Spring Shell Component and I can run my init-users command. When I start the image locally or ...
Bademeister's user avatar
0 votes
0 answers
7 views

ValueProviderSupport from package org.springframework.shell.standard.ValueProviderSupport not supported in spring-shell-starter :3.1.3

Currently our project has spring-shell-starter with version 2.0.1.RELEASE we have tried upgrading to spring-shell-starter :3.1.3 but facing an issue with "Cannot resolve symbol '...
Surya Chandra's user avatar
0 votes
0 answers
13 views

How to extract documentation from SpringShell @ShellMethod annotations

I am developing a shell from SpringShell and use the @ShellMethod to annotate the methods that are invoquable from the Shell. The annotation includes a brief description of the command/method. @...
Abdelghani's user avatar
0 votes
0 answers
17 views

Spring Shell (version:3.1.2) Problem:Can't input Chinese characters by using StringInput component

Chinese characters disappear in StringInput component and doesn't display in the screen just like I never input it,but it works in traditional command in Spring Shell I hope this problem can be solved,...
Eternal-night-blip's user avatar
1 vote
0 answers
46 views

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: ...
Mikhail Krasikov's user avatar
0 votes
0 answers
40 views

How can I update the Spring shell prompt without invoking a shell command?

I have an application using Spring shell version 2.1.11 (we are limited to Java 11) that provides commands to manage external services and a timer task to check the status of those services in the ...
Phil B.'s user avatar
  • 13
0 votes
0 answers
11 views

IOError Stream close when i'm using spring shell

When I use my application with Scanner() I received error: Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. shell:>2023-06-...
ivvasch's user avatar
1 vote
1 answer
34 views

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....
ApachieIgniteNewbie123's user avatar
0 votes
1 answer
108 views

Spring Shell - How To Disable All or Some Of The Built-In Commands

Using Spring Shell 3.0 I would like to disable some of the built-in commands, e.g. stacktrace, script. Is this possible to achieve?
D-Dᴙum's user avatar
  • 7,689
0 votes
0 answers
183 views

Spring Shell not initializing

I am trying to create a CLI application that has several commands using Spring Shell, having dependencies on another project and Spring. This is my pom: <groupId>es.uca.dss.sigeca</groupId&...
AlexZape's user avatar
0 votes
1 answer
51 views

how to authenticate users managed by keycloak in Spring Shell CLI app and store the token retrieved securely

Im developing a spring shell app whose main job is to make requests to a Spring boot rest API and display the results to the user. The problem is the users of the rest API are managed by keycloak, ...
someone's user avatar
0 votes
0 answers
85 views

How to open a new terminal tab using Spring boot dependency Spring Shell

I have certain use case which requires opening of a new terminal tab/window from current terminal window, both terminal will be running in different context. For eg. a chat application is running on ...
JCodeX's user avatar
  • 19
0 votes
0 answers
20 views

How to remove the empty new line after spring-shell tables?

I use Spring Shell TableBuilder to draw tables. After each table it draws an empty line. How is possible to remove the empty line at the end of the Spring Stell tables? I looked at the examples but ...
ckid's user avatar
  • 1
1 vote
1 answer
155 views

Spring shell 3 - StringInputContext not prompting for input?

I set up a new project using spring-boot(-shell) 3.0.3 and I'm just trying to capture some inputs and return them. When I pass in the arguments using ShellOption everything works fine, but I wanted to ...
Peter Frankeins's user avatar
0 votes
0 answers
63 views

Spring Shell another properties location

how can I set another properties file location in Spring Shell? When I try java -jar ovh-email-creator.jar --spring.config.location=application.yaml I got a No command found for '--spring.config....
Hubert Kuch's user avatar
0 votes
1 answer
129 views

Is there a way to define a ShellOption without value to check if it exists or not?

I'm using Spring Shell for one of my projects, and I need a parameter to run my command with a different behavior like --without-logs. Basically I need a ShellOption parameter to check if the ...
Muratcan Şentürk's user avatar
0 votes
1 answer
47 views

How to implement multi-part / sub commands in Spring Shell?

I am using Spring Shell 3.0.0 to implement a command line application. The application deals with several types of objects and has several commands for each type of object, for example: list-foos ...
anarchitect's user avatar
0 votes
0 answers
40 views

Is there a group key for spring shell?

I have 2 shell mehtods like this: @ShellMethod(key = ["context set"]) fun setContext(dbContext: String) { println("Set db context to $dbContext") } @ShellMethod(key = ["...
Jacob Goetz's user avatar
1 vote
2 answers
360 views

Spring Shell components don't show up

I'm trying to use the Spring Shell built-in components StringInput, PathInput, ConfirmationInput, SingleSelect and MultiSelect. Each time I try and use one of these by executing the run() method they ...
μ-the-ultimate's user avatar
0 votes
1 answer
836 views

Unable to use optional parameters in Spring-shell

I'm trying to write some code in spring-shell I'm getting some issues. Please find the code below @ShellComponent public class CommandDemo { @ShellMethod(value = "This command is used to ...
Sankar's user avatar
  • 39
1 vote
1 answer
164 views

How to pass varargs in Spring shell with kotlin

I am trying to write a spring shell app and pass some var args. Basicaly I want to pass fetch FA-207542 FA-207984 FA-211258 FA-202298 Documentation here is still TBD @ShellMethod(value = "...
Christian Bongiorno's user avatar
0 votes
1 answer
114 views

How to prevent automatic assignment of arguments in the absence of their switch in spring shell version 2.x?

I have switched to spring shell version 2. Consider I have a command accepting one argument: @shellMethod public void greet(@ShellOption String name){ System.out.println(String.format("Hello %...
kvs's user avatar
  • 178
0 votes
1 answer
215 views

Spring shell command line application returning null from a shell method

I have a simple CLI application that prints out your name from the official docs here. @ShellComponent public class Cli { @ShellMethod("Say my name") public String hi(@ShellOption(value = ...
Amos Machora's user avatar
0 votes
1 answer
205 views

Spring Shell: Is it possible to start spring shell at runtime on demand

I am runing a spring-boot app as a backend application within a docker container. I want to be able to exec in a container and start a shellMethod to execute some admin stuff. Is it possible start and ...
FishingIsLife's user avatar
0 votes
1 answer
39 views

The Availability Doesn't Function When The App Is Started From the Command LIne

I encounter a few unreasonable issues with a Spring Shell app which has the dependency as <dependency> <groupId>org.springframework.shell</groupId> <artifactId&...
vic's user avatar
  • 2,566
1 vote
0 answers
87 views

NullPointerException while starting Spring Shell on Heroku worker node

Recently we are facing an issue that we cannot start our Spring Shell app on our Heroku worker node anymore. Directly after the shell app has started the console just prints java.lang....
Michael Wurster's user avatar
0 votes
0 answers
458 views

Support of "exit on error" for "script" command in spring-shell

Currently, when we trigger a "script" command in spring-shell prompt, it executes all the commands present in a file, even if one of them threw any exception(other than ExitRequest). I found ...
RDK's user avatar
  • 144
0 votes
1 answer
594 views

Run spring boot shell as daemon

I have an Spring boot web-application with an interactive shell for configuration. I want to run my app as daemon to start server. When I run it normally using java -jar app.jar I get an interactive ...
MTM's user avatar
  • 113
1 vote
2 answers
3k views

Autowired/Dependencies injection doesn't work in a Spring Shell project

I started a new project from https://www.baeldung.com/spring-shell-cli I was trying to use dependency injection or Autowired annotation on my BannerProvider class. But Spring raise an exception. My ...
Alienhunter3010's user avatar
1 vote
1 answer
876 views

Spring Shell fails when running in jar

I am building a shell application using Spring shell. At this point, everything is running fine on intelliJ, meaning I can run my commands without any problems. I am using JPA with hibernate being the ...
Brendon Cheung's user avatar
0 votes
1 answer
641 views

Spring shell with command line runner interface

I have a problem while running spring boot spring shell application. I have implemented commandlinerunner but its never called during application startup. @Component public class ParamReader ...
callmesunil's user avatar
1 vote
1 answer
4k views

java.lang.ClassNotFoundException: org.springframework.core.ErrorCoded

I am using below dependencies in my spring boot shell application. <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>...
Hari Krishna's user avatar
  • 3,658
6 votes
1 answer
842 views

Send multiple commands in the same line

Is there are way to send several commands on the same line using the spring-shell. For example: shell> add 1 2; add 3 4 3 7 I've noticed that if I run my application from Intellij, I can copy ...
0x26res's user avatar
  • 12.1k
0 votes
0 answers
161 views

Using a JavaFX TextArea control as the terminal of an spring-shell app

I am working in a tool which requires the user to interact with a console and for each typed command there is a graphic representation with the result of the command. I would like to have a single ...
Orlando Garcia's user avatar
0 votes
1 answer
558 views

Using Spring Shell with Tomcat

As described here: https://github.com/indrabasak/spring-shell-example most of spring shell projects are launched by this way: mvn clean install then java -jar target/[generated_jar]jar Now, ...
Loïc Madiès's user avatar
-1 votes
1 answer
665 views

How can i access through ssh spring shell cli

I am trying to implement a simple cli application ( executable jar file running in linux docker image) using spring-shell library. After i started the Docker image with "docker run -it -p 8080:8080 ...
Thanasis B's user avatar
2 votes
1 answer
1k views

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 ...
Marcus's user avatar
  • 166
2 votes
1 answer
2k views

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 ...
Sebastian Sommerfeld's user avatar
5 votes
1 answer
2k views

Is there a way to run spring-shell 2.x in a non interactive mode

We are building a spring-shell application. currently, in interactive mode, I have to go like java -jar sample.jar shell:> mycommand arg1 agr2 is there a way to run this nun interactively, ...
Azhar's user avatar
  • 51
2 votes
1 answer
1k views

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 ...
Daniele's user avatar
  • 21
1 vote
1 answer
101 views

Print Fixed Lines with Spring Shell

I want to develop a small Sprint Shell project where I display static information which potentially updates when an event is received. Is this functionality possible with Spring Shell, or is it even ...
Marcus Held's user avatar
3 votes
1 answer
2k views

Execute shell commands from Spring Shell

I have a case which I want to ask can I solve with Spring Shell. I have a main.jar application which have several Scheduled Spring Jobs deployed on Wildly server. In my case I can't stop or redeploy ...
Peter Penzov's user avatar
  • 1,208
2 votes
1 answer
1k views

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's user avatar
  • 1,208
1 vote
1 answer
505 views

Parameter resolving /converter for dynamically registered commands

I am working on a Spring Shell 2 CLI and i am trying to generate commands at runtime from a defined interface through reflection. Update: The implementation of the interface is also generated at ...
Crossbone's user avatar
0 votes
1 answer
704 views

How do I set color of user input in Spring Shell 2?

I have a similar question to: Commands color in spring shell 2 but I am more interested in how I can override the color of user input. When I open my Spring Shell 2 application and start typing a ...
Robviously's user avatar
0 votes
2 answers
121 views

Go back to Spring shell prompt after printing to Stdout

I'm currently working with Spring Shell. My problem is that whenever I print something to stdout, the program doesn't go back to the prompt unless the user presses the Enter button. Are there possible ...
Max's user avatar
  • 1
0 votes
1 answer
386 views

Executing OS Commands from Spring Shell

I'm using org.springframework.shell:spring-shell-starter:2.0.0.RELEASE With gradle and Spring My question is: Is there anyway to open vi or vim to edit a file in the OS from the shell?. if not ...
James Hameson's user avatar
0 votes
1 answer
512 views

Commands color in spring shell 2

In SPRING SHELL 2 the default incorrect command and error output colors are red. Is it possible to define custom colors for these purposes? Thank you!
Liubov E.'s user avatar
  • 129
0 votes
1 answer
133 views

Spring shell vs JMX

While studying about spring-boot, I stumbled upon shell support (CRsh (boot v1.x) Spring-Shell (boot v2.x)). What I am not able to understand is we already have a rich support for JMX which has been ...
Himanshu Bhardwaj's user avatar