java.lang.Object
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 Object implements Command, 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)
    • getDescription

      public String getDescription()
      Description copied from interface: Command
      Get a short description of the command.
      Specified by:
      getDescription in interface Command
      Returns:
      the description of the command
    • getGroup

      public String getGroup()
      Description copied from interface: Command
      Get the group of the command.
      Specified by:
      getGroup in interface Command
      Returns:
      the group of the command
    • execute

      public ExitStatus execute(CommandContext commandContext) throws Exception
      Description copied from interface: Command
      Execute the command within the given context.
      Specified by:
      execute in interface Command
      Parameters:
      commandContext - the context of the command
      Returns:
      the exit status of the command
      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