java.lang.Object
org.springframework.shell.core.command.AbstractCommand
org.springframework.shell.core.command.Version
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, Command

public class Version extends AbstractCommand implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Command to print the current version of Spring Shell.
Author:
Janne Valkealahti, Mahmoud Ben Hassine, Piotr Olaszewski, David Pilar
  • Constructor Details

    • Version

      public Version()
  • Method Details

    • setBuildProperties

      public void setBuildProperties(Version.BuildProperties buildProperties)
    • setGitProperties

      public void setGitProperties(Version.GitProperties gitProperties)
    • getHelp

      public String getHelp()
      Description copied from interface: Command
      Get the help text of the command. It is reported as the DESCRIPTION section of the detailed help message of the command, which is omitted when the text is empty. Unlike Command.getDescription(), which is a one liner shown in the list of available commands, the help text is meant to be a longer explanation of what the command does.
      Specified by:
      getHelp in interface Command
      Overrides:
      getHelp in class AbstractCommand
      Returns:
      the help text of the command, empty when the command does not define one
    • doExecute

      public ExitStatus doExecute(CommandContext commandContext) throws Exception
      Specified by:
      doExecute in class AbstractCommand
      Throws:
      Exception
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean