Questions tagged [spring-shell]
Spring Shell is an interactive shell that can be easily extended with commands using a Spring based programming model
85
questions
0
votes
0
answers
5
views
Spring-shell screen clearing on startup in ConEmu
I use this version: https://github.com/spring-projects/spring-shell/tree/main/spring-shell-samples
I use this console: https://conemu.github.io/
Simple problem: screen is 'clearing' on startup. It ...
0
votes
0
answers
6
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&...
1
vote
0
answers
32
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....
0
votes
0
answers
49
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 ...
0
votes
1
answer
88
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 ...
0
votes
0
answers
45
views
spring-shell books and recourses
guys I am trying to build a spring-shell application that is embedded inside swing application with simple interface just like the one explained in this video, were users able to write and see a ...
1
vote
2
answers
1k
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 ...
1
vote
1
answer
398
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 ...
0
votes
1
answer
387
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 ...
1
vote
1
answer
2k
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>...
6
votes
1
answer
470
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 ...
0
votes
0
answers
110
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 ...
0
votes
1
answer
436
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, ...
-1
votes
1
answer
405
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 ...
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 ...
2
votes
1
answer
887
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 ...
4
votes
1
answer
750
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,
...
2
votes
1
answer
639
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 ...
0
votes
1
answer
66
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 ...
3
votes
1
answer
1k
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 ...
2
votes
1
answer
738
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?
1
vote
1
answer
378
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 ...
0
votes
1
answer
503
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 ...
0
votes
1
answer
65
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 ...
0
votes
1
answer
263
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 ...
0
votes
1
answer
400
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!
0
votes
1
answer
115
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 ...
3
votes
1
answer
2k
views
Spring Shell appilication inside docker
I am trying to deploy/run a spring shell application inside a docker container. It is starting but filing when tries to open CLI.
2018-07-20 19:24:44.588 INFO 1 --- [ main] ...
0
votes
2
answers
521
views
Spring shell 2.0 how to read inputs with mask
Is there any way to mask user inputs in Spring Shell 2.0.x ?
I need to collect password from user.. did not find any shell api to do that.
Thanks!!
1
vote
4
answers
2k
views
select from a small amount of options in spring shell
I am currently trying to make an cli app with Spring Shell.
I want the user to able to fast pick one of 2-3 options. My current code works fine in eclipse but when I start it in Powershell, i have to ...
2
votes
3
answers
2k
views
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);
}
}
...
0
votes
1
answer
178
views
Spring-Shell alias name for Input values
am new to Spring-Shell. I need to collect input values from CLI with Input-alias name. below code accepting values even without an Input-alias name.
@ShellMethod("Get full Name.")
public String ...
2
votes
3
answers
1k
views
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.
1
vote
2
answers
813
views
How to print colors text in the spring shell with Java?
In my spring shell app i'm using the following code to print colored text but it's not works for me.
Note: this works in netbeans ideas console and prints "sampleText" in red color, but does not in ...
1
vote
1
answer
656
views
Customise Banner In spring Shell 2
I have used spring Shell 1.x. It provided provision for customise the banner. I am not trying to use Spring shell 2 and trying to do that same but i cannot finding the class.
Document also does not ...
0
votes
2
answers
969
views
How to run exit built in command in spring shell?
I'm using spring shell and it's work fine. but i want to run some built in command for example exit command in a method.
How can i do that?
@Component
public class runCommand implements ...
0
votes
1
answer
175
views
Spring-shell along with spring-boot NullPointerException
I am trying to build a simple app using spring boot and spring shell . My pom.xml is like this:
I am getting the below error when trying to connect to the shell using putty
I am not able to get any ...
4
votes
3
answers
3k
views
How to Integration Test Spring Shell v2.x
The new Spring Shell docs don't seem to provide any examples of how to integration test CLI commands in a Spring Boot context. Any pointers or examples would be appreciated.
2
votes
2
answers
1k
views
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?
7
votes
6
answers
11k
views
Executing a single command and exiting from Spring Shell 2
I stumbled upon this question from a while back, explaining how to get a Spring Shell application to exit after calling it from the command line with a single command. However, testing this in 2.0.0 ...
1
vote
1
answer
184
views
Spring Shell 2: Refactoring-safe Dynamic Command Availability
I'm just trying out Spring Shell 2. The section Dynamic Command Availability of the reference documentation shows three ways to indicate availability. However, all of them rely on a naming scheme or ...
0
votes
1
answer
670
views
Spring Shell Filepath as parameter
I want to have a parameter in a @CliCommand which is a network path. Something like \\path\to\newfolder. This folder will then be read and further processed.
However as java interprets backslashes ...
0
votes
1
answer
271
views
Async IO handling in Spring CLI with Java how to?
I have built a Spring CLI app which communicates with a server in an async fashion. The server was given, I did not create it, basically my app is required to open a TCP socket and send a JSON through ...
0
votes
1
answer
182
views
How to control netty server from spring-shell
I try to create a console with "spring shell", I would like to run my own netty socket server command. I have a command:
@CliCommand(value = "server", help = "Start socket server")
public String ...
0
votes
1
answer
238
views
Spring-shell usage
I'm trying to use spring-shell.
Created such class:
@Component
public class T implements CommandMarker {
public T() {
System.out.println("T Constructor");
}
@CliCommand(value = "trans", help = ...
5
votes
1
answer
569
views
Long running Command execution interruption in Spring Shell
I am using Spring Shell to run some long running command. Is there anyway to interrupt a running command in Spring Shell using Control+C command without exiting the shell.
0
votes
1
answer
539
views
Spring Cloud DataFlow shell command "not currently available"
I sometimes get this error:
2016-10-20T15:38:24+0200 WARN main o.s.s.c.SimpleParser:131 - Command 'app register --name email --type source --uri <uriToMyDockerImage>' was found but is not ...
1
vote
3
answers
624
views
Confirmation message Spring shell
Is there an way for a spring-shell command to first ask for a confirmation message. For example
command
Do you want to proceed [y/n]
y
executing command
I did some research on internet but I don'...
0
votes
1
answer
213
views
Run method after startup finishes
I am creating a command line application in java using Spring-shell. I want to implement auto update feature. I want to run the "check for update" code as soon as Spring-shell finish its ...
15
votes
2
answers
15k
views
how to build console command in spring boot web application using spring shell?
I have created restfull web application using spring boot web starter which works well. I am able to access it through urls.
But I have requirement to create console command which can compute and ...