Skip to content

Conversation

@piotrooo
Copy link
Contributor

@piotrooo piotrooo commented Nov 2, 2025

Partially resolves: gh-1203

After the removal of DefaultShellApplicationRunner in this commit: ff73bdc, Spring Boot applications no longer have an entry point for shell runners.

This causes shell programs not to run.

spring-projectsgh-1203

Signed-off-by: Piotr Olaszewski <piotr.olaszewski@thulium.pl>
@piotrooo piotrooo marked this pull request as ready for review November 2, 2025 16:00
@fmbenhassine
Copy link
Contributor

fmbenhassine commented Nov 2, 2025

@piotrooo Thank you for the PR! But I think there is deeper issue: command discovery is still broken. In the hello world example, spring-shell-starter brings spring-shell-standard which is supposed to add basic commands, but that is not the case. I mean with this PR, the hello world sample now works again and the command hello is recognized, but it's impossible to exit the shell.. exit and quit are not registered.

Moreover, I do not understand why ShellRunner#run returns a boolean and not void as it was before. The javadoc mentions Return value indicates if run operation happened and no further runners should be used. but in my opinion it is not the ShellRunner's repsonsbility to decide the flow of execution (ie if another runner should run or not). More explicitly, If I want to implement a custom runner, I don't know if I should return true or false in my custom implementation. In others words, having to do the following seems awkward to me:

boolean run = runner.run(args.getSourceArgs());
if (run) {
   return;
}

I think we need to fix that before proceeding as well.. Thoughts?

@piotrooo
Copy link
Contributor Author

piotrooo commented Nov 2, 2025

I've opened a discussion at #1209. It should be more convenient.

@piotrooo piotrooo closed this Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build successful despite errors

2 participants