Exit

The quit command (also aliased as exit) exits the interactive shell loop. To explicitly close the Spring application context after shell execution finishes, set spring.shell.context.close=true; see Context Close.

In a non-interactive shell (spring.shell.interactive.enabled=false), the quit command can be removed from the command registry (and therefore from the help output) by setting the spring.shell.command.quit.enabled property to false:

spring:
  shell:
    command:
      quit:
        enabled: false
This property has no effect in an interactive shell. Typing quit or exit always works there, regardless of the command registry, so the command is always kept in the help output to avoid hiding a still-functional way to leave the shell.