118 questions
0
votes
1
answer
107
views
How to manage commands availablity dynamically in a Spring Shell application?
I'm building a command-line interface application using Spring Shell.
It has :
5 commands named "a", "b", "c", "d", "e". Each command is defined in ...
0
votes
2
answers
82
views
How do I get the output of the previous command using Spring Shell?
How do I read the output of the previous command in Spring Shell? Like this:
$ cat hi.txt
cat: hi.txt: No such file or directory
$ javac hello.java
hello.java:3: error: non-static method hi() cannot ...
1
vote
1
answer
103
views
How to pass the path into a method in Spring Shell?
I want the user to input the path to a file as an argument, but it removes the slashes. For example, when the user inputs C:\test.txt inside the fileRead method, I get c:test.txt.
@ShellMethod(value = ...
-2
votes
1
answer
124
views
Spring Shell ComponentFlow and locale
How do I accept non-english characters when using ComponentFlow in Spring Shell?
It works fine with non-english characters when using the Shell normally, but when using the ComponentFlow it does not. ...
3
votes
3
answers
1k
views
Spring Shell not running interactive mode windows 11 - Unable to create a system terminal, creating a dumb terminal
I'have created simple SpringShell app (java 21 and maven) using spring initializr and created class HelloCommand.java.
While running app in IntelliJ IDEA I'm occurring a warning Unable to create a ...
0
votes
1
answer
83
views
Groovy Spring Shell program fails when equivalent Java version works
I've run aground when trying to do the Spring Shell Tutorial. I
downloaded a basic application from Spring Intializr with the
following properties:
Project : Gradle - Groovy
Spring Boot: 3.3.0
...
0
votes
0
answers
155
views
Spring Shell with docker-compose does not work
I have Spring boot application with Spring shell console. When i running it on a local machine frome IDE everything is good. O wrote Dockerfile and docker-compose to deploy my app, but when i running ...
1
vote
2
answers
516
views
What is the difference between Spring CLI and Spring Shell
According to my learning, Spring CLI and Spring Shell are tools for building command-line applications, Spring CLI is focused on running Groovy scripts and Spring Boot applications from the command ...
1
vote
1
answer
532
views
GraalVM native-image works within IDE (java17) but does not when native-image is built
I have a spring shell application that does pretty simple stuff like sending a get request from the terminal.
pom.xml dependencies
<dependency>
<groupId>org.springframework.boot<...
2
votes
0
answers
323
views
Spring Shell: how to execute commands immediately after starting interactive mode
Before I work in interactive mode I like to run some commands, e.g. 'help', 'clear' or 'my-command1'. Afterwards I would like to continue working in interactive mode.
With version 2 it worked fine for ...
0
votes
1
answer
68
views
How do I set the {userconfig} location
From the documentation:
By default, a log file is generated to a current working directory, which you can dictate by setting spring.shell.config.location. This property can contain a placeholder ({...
0
votes
1
answer
233
views
Customize help command in Spring Shell 3.1.6
I've built a spring-shell application and I'd like to customize the built-in help command. Currently it looks like this:
shell:>help help
NAME
help - Display help about available commands
...
2
votes
1
answer
472
views
Spring Shell: required Boolean with non-default value
spring shell version: 3.1.6
In one of my commands, I want to make sure that the end-user specifically indicates whether they either want A or B by using a Boolean. I don't want to make the choice for ...
3
votes
1
answer
1k
views
What does Spring Boot test default configurations warn "Parameter 'systemProperties' is deprecated"?
In a Spring Boot test, when I annotated with @SpringBootTest,
I get warning:
Parameter 'systemProperties' is deprecated: Use systemPropertyVariables instead.
Why is that and how can I fix it?
This ...
0
votes
2
answers
124
views
How to Stream text from a method annoted with @ShellMethod in Spring boot
I use Spring boot 3.1.x for some shell interaction. I want to stream text from a method to the console.
I've tried something like this:
@ShellMethod(key = "stream")
public Flux<String> ...