Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
1 answer
52 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. ...
Kasper's user avatar
  • 141
2 votes
3 answers
155 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 ...
milosz_amg's user avatar
0 votes
1 answer
43 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 ...
Big Ed's user avatar
  • 1,214
0 votes
0 answers
27 views

InterruptedIOException using Spring-Shell TerminalUI Framework

Using JDK 17, Spring-Boot 3.3.0 and Spring-Shell 3.3.0 I'm experiencing ajava.io.IOError: java.io.InterruptedIOException: Command interrupted exception when the UI application is legitimately ...
D-Dᴙum's user avatar
  • 7,825
0 votes
0 answers
47 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 ...
Coov Show's user avatar
0 votes
0 answers
34 views

How do I create shell components using the 3.x annotations vs legacy annotations?

I am looking at the documentation where I see to make a string component I need to give the component the terminal at instantiation, then set the resource loader and template executor. Using the ...
E.J.'s user avatar
  • 1
0 votes
0 answers
14 views

Spring Shell Enumerations:: Displaying all values in Spring-Shell-Documentation

I have a Spring Shell Option that use an Enumeration. public enum FilesType {files, dirs, all} In the Help documentation only the type is displayed. ie: shell:>help mycommand -t ...
MaduKan's user avatar
  • 584
1 vote
2 answers
220 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 ...
Pushpendra Kushvaha's user avatar
1 vote
1 answer
253 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<...
Ahmed Nabil's user avatar
2 votes
0 answers
208 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 ...
Raphael Fleischer's user avatar
0 votes
1 answer
37 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 ({...
Tallen67's user avatar
0 votes
1 answer
142 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 ...
Tallen67's user avatar
2 votes
1 answer
329 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 ...
frankmurphy's user avatar
0 votes
0 answers
85 views

Spring Shell: Execute multiple commands in one line

I have two commands in my Spring Shell application: @ShellComponent public class HelloCommand { @ShellMethod(value = "hello") public void hello(){ System.out.println("...
Shacotiz's user avatar
2 votes
1 answer
554 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 ...
MaduKan's user avatar
  • 584
0 votes
0 answers
16 views

How to know if CommandContext.getOptionValue returns default value or argument value?

Say I have command options Lorem and Ipsum. Lorem is of type String[].class while Ipsum is of type boolean.class. Lorem has a default value of "a,b,c" while Ipsum has a default value of &...
yaserso's user avatar
  • 2,848
0 votes
2 answers
62 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> ...
user1409534's user avatar
  • 2,242
0 votes
2 answers
463 views

How to tell Spring-Shell to not parse command line arguments as shell commands?

I am using spring-shell to develop a CLI app. @SpringBootApplication @CommandScan public class App { public static void main(String[] args) throws Exception { SpringApplication application = ...
morpheus's user avatar
  • 19.9k
2 votes
1 answer
179 views

Spring Shell - SingleItemSelector not working in Windows console but fine in Ubuntu terminal

Hello anyone is using Spring Shell? I am trying to use SingleItemSelector which lists items and waits for the user to choose one. It works fine but in Windows, it doesn't wait and just take null value ...
Tommy's user avatar
  • 105
0 votes
1 answer
73 views

Spring shell with groovy

I have my class: package com.ejemplo.prueba; import org.springframework.shell.standard.ShellComponent import org.springframework.shell.standard.ShellMethod @ShellComponent class MyShellCommands { ...
user2911197's user avatar
0 votes
0 answers
54 views

Spring shell prompt prints different things when run from a LaunchAgent or manually

I have a JAR file (authentication.jar) that is using org.springframework.shell to provide a simple console to generate tokens. In there is defined a custom PromptProvider: @Component @...
Aisteru Firë's user avatar
1 vote
1 answer
207 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
24 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
2 votes
0 answers
128 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
1 answer
153 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
1 vote
1 answer
133 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
2 answers
439 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,825
1 vote
1 answer
674 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
109 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
1 vote
1 answer
410 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
1 answer
273 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
1 vote
2 answers
382 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
1 vote
2 answers
1k 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
2k 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
280 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
208 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
  • 318
0 votes
1 answer
346 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
481 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
51 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,778
1 vote
0 answers
100 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
570 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
  • 151
0 votes
1 answer
891 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
  • 153
1 vote
2 answers
4k 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
1k 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
890 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
5k 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,778
7 votes
1 answer
1k 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
  • 13.6k
0 votes
0 answers
176 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
615 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
839 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