Spring based interactive shell

Related tags

CLI spring-shell
Overview

Spring Shell 3

Spring Shell 3 is a work to solely depend on Spring Boot 2.x and not trying to keep any backward compatibility with older Spring Shell 1.x nor Spring Boot 1.x.

Building

./mvnw package

Running

The project comes with a sample application, showcasing the various ways you can write commands.

./mvnw install
./mvnw -pl spring-shell-samples spring-boot:run

From there, try typing help or help <commmand> at the shell prompt.

Comments
  • Ability to configure CLI as non-repl

    Ability to configure CLI as non-repl

    In order to write/consume CLI apps similarly to other CLI tools, I would like to use a spring-shell-based java app without being dropped into a REPL, and instead call the application with command-line arguments.

    I'm sure there are ways to do this by wiring up the proper configuration beans, but it would be much preferred if this workflow were supported && made easy as possible.

    example

    E.g., being able to call it as java -jar Main --arg_a=blah --arg_b=blahblah, etc., rather than having to use the REPL.

    (warning: talking out of my butt here) and if graal makes it possible, it would be so much more natural to compile a spring-shell java binary down to a standard executable, and then use that just as you would any other binary. Then instead of java -jar Main ... it becomes as easy as main --arg_a=blah ..., etc.

    extended rationale

    • At the moment, it seems golang is widely used for CLIs (bosh-cli, credhub-cli, fly-cli, cf-cli, etc.). Why not let Java developers get in on the action?
    • I'm very interested in writing applications which can be used in an automation toolchain, such as on Concourse. If the automation is dropped into a REPL and gets stuck, it's not useful.
    • Being able to chain together inputs/outputs of a spring-shell executable with other commands requires a non-REPL workflow (e.g., how most *nix utils work, cat file | grep "blap" | etc)
    opened by aegershman 12
  • How to use log4j to manage spring-shell console ?

    How to use log4j to manage spring-shell console ?

    HandlerUtils can not be extended.

    六月 30, 2017 3:40:26 下午 org.springframework.shell.core.AbstractShell handleExecutionResult 信息: copy done

    here. I want only output "copy done". How to do ? Only change spring-shell HandlerUtils code ?

    opened by chilly 12
  • Support execute-then-quit as arguments in addition to @/path/to/file

    Support execute-then-quit as arguments in addition to @/path/to/file

    Make ResultHandlers configuration more explicit Handle exit as a dedicated case (prevents eg 'exit' commands in scripts to make script quit) Add an example of custom ApplicationRunner

    Fixes #187 Fixes #183

    opened by ericbottard 11
  • Executing a single command and exitting

    Executing a single command and exitting

    I stumbled upon this question on Stack Overflow, explaining how to get a Spring Shell application to exit after calling it from the command line with a single command. However, testing this in 2.0.0 with Spring Boot, it does not seem to be the case any more that invoking the JAR with command arguments will execute that command and then exit. The shell just starts as normal without executing the supplied command. Is it still possible to do this? If not, would it be possible to pass the arguments from the JAR execution to Spring Shell and then trigger an exit after execution?

    opened by woemler 11
  • Have Shell Play Nice With Spring Boot

    Have Shell Play Nice With Spring Boot

    I've tried combining Spring Boot and Spring Shell because I liked how Spring Boot can create a nice self-contained executable JAR. What I found was that both projects create competing Spring contexts. I've tried a couple different hacks with less than satisfactory results. It would be nice if Spring Shell and Spring Boot were aware of each other so that we could write nice shell-based tools and get all the Spring Boot goodness as well.

    opened by kurron 11
  • Spring Shell log file location not changed

    Spring Shell log file location not changed

    Hi @ericbottard, I hope you are doing good

    I have added these two lines in my properties file to change the spring shell log file location but it does not create/save in my desired location and file. It saves on the root of the project directory with my project name.

    spring.shell.config.location=./logs spring.shell.history.name=shell-command.log

    Here is the Reference link Spring Shell History

    opened by ateequrrahman97 10
  • Added converters.ObjectConverter and converters.ArrayConverter

    Added converters.ObjectConverter and converters.ArrayConverter

    Added "objects" sample application. The "objects" sample shows usage of ObjectResolver, ObjectConverter and ArrayConverter.

    Added ObjectConverterTest and ArrayConverterTest.

    ArrayConverter uses reflection and throws an Error if it is used but Java 6 is not available.

    opened by huxi 10
  • Spring Shell starter crashes my SpringBoot application simply by being added as a compile dependency

    Spring Shell starter crashes my SpringBoot application simply by being added as a compile dependency

    I am trying to use SpringShell in a small SpringBoot project. I am running on OSX. By simply adding the dependency on Spring shell to my build: compile 'org.springframework.shell:spring-shell-starter:2.0.0.M1' the application fails to start with the following stack trace:

    `Agatas-MacBook-Pro:kumori agatanoair$ gradle bootRun :generateAvroProtocol UP-TO-DATE :generateAvroJava :compileJava Note: /Users/agatanoair/Documents/workspace/kumori/kumori/build/generated-main-avro-java/dk/mathmagicians/kumori/technology.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :processResources UP-TO-DATE :classes :findMainClass :bootRun 00:31:46.678 [main] INFO dk.mathmagicians.kumori.KumoriApplication - Starting Kumori application ... <3<3<3

    . ____ _ __ _ _ /\ / ' __ _ () __ __ _ \ \ \
    ( ( )_
    _ | '_ | '| | ' / ` | \ \ \
    \/ __)| |)| | | | | || (
    | | ) ) ) ) ' || .__|| ||| |_, | / / / / =========||==============|/=//// :: Spring Boot :: (v1.5.7.RELEASE)

    2017-10-05 00:31:47.301 INFO 6140 --- [ main] d.m.kumori.KumoriApplication : Starting KumoriApplication on Agatas-MacBook-Pro.local with PID 6140 (/Users/agatanoair/Documents/workspace/kumori/kumori/build/classes/main started by agatanoair in /Users/agatanoair/Documents/workspace/kumori/kumori) 2017-10-05 00:31:47.304 INFO 6140 --- [ main] d.m.kumori.KumoriApplication : No active profile set, falling back to default profiles: default 2017-10-05 00:31:47.379 INFO 6140 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@709ba3fb: startup date [Thu Oct 05 00:31:47 CEST 2017]; root of context hierarchy 2017-10-05 00:31:47.947 INFO 6140 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'iterableResultHandler' with a different definition: replacing [Generic bean: class [org.springframework.shell.result.IterableResultHandler]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/agatanoair/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-core/2.0.0.M1/7f10ac2bd9f652b68a0a644119940f19ee8d491e/spring-shell-core-2.0.0.M1.jar!/org/springframework/shell/result/IterableResultHandler.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=resultHandlerConfig; factoryMethodName=iterableResultHandler; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/shell/result/ResultHandlerConfig.class]] 2017-10-05 00:31:48.205 INFO 6140 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.shell.SpringShellAutoConfiguration' of type [org.springframework.shell.SpringShellAutoConfiguration$$EnhancerBySpringCGLIB$$d2387e5b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2017-10-05 00:31:48.220 INFO 6140 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'conversionService' of type [org.springframework.core.convert.support.DefaultConversionService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2017-10-05 00:31:48.634 WARN 6140 --- [ main] org.jline : Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information) 2017-10-05 00:31:48.876 WARN 6140 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'parameterValidationExceptionResultHandler': Unsatisfied dependency expressed through field 'parameterResolvers'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardParameterResolver': Unsatisfied dependency expressed through method 'setValueProviders' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through method 'commandValueProvider' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'script' defined in class path resource [org/springframework/shell/standard/commands/StandardCommandsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'script' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.Histo ry]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" 2017-10-05 00:31:48.889 INFO 6140 --- [ main] utoConfigurationReportLoggingInitializer :

    Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2017-10-05 00:31:48.902 ERROR 6140 --- [ main] o.s.boot.SpringApplication : Application startup failed

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'parameterValidationExceptionResultHandler': Unsatisfied dependency expressed through field 'parameterResolvers'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardParameterResolver': Unsatisfied dependency expressed through method 'setValueProviders' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through method 'commandValueProvider' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'script' defined in class path resource [org/springframework/shell/standard/commands/StandardCommandsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'script' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at dk.mathmagicians.kumori.KumoriApplication.main(KumoriApplication.java:20) [main/:na] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardParameterResolver': Unsatisfied dependency expressed through method 'setValueProviders' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through method 'commandValueProvider' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'script' defined in class path resource [org/springframework/shell/standard/commands/StandardCommandsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'script' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:667) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1316) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1282) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1180) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1096) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 18 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through method 'commandValueProvider' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'script' defined in class path resource [org/springframework/shell/standard/commands/StandardCommandsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'script' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1316) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1282) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1180) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1096) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:659) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 34 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'script' defined in class path resource [org/springframework/shell/standard/commands/StandardCommandsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'script' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 50 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'script' defined in class path resource [org/springframework/shell/standard/commands/StandardCommandsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'script' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansWithAnnotation(DefaultListableBeanFactory.java:564) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBeansWithAnnotation(AbstractApplicationContext.java:1208) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.shell.standard.StandardMethodTargetRegistrar.register(StandardMethodTargetRegistrar.java:55) ~[spring-shell-standard-2.0.0.M1.jar:2.0.0.M1] at org.springframework.shell.Shell.gatherMethodTargets(Shell.java:98) ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 63 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.shell.jline.JLineShellAutoConfiguration': Unsatisfied dependency expressed through field 'history'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 83 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'history' defined in class path resource [org/springframework/shell/jline/JLineShellAutoConfiguration$HistoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 106 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jline.reader.History]: Factory method 'history' threw exception; nested exception is java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 118 common frames omitted Caused by: java.lang.NumberFormatException: For input string: "// Spring Shell 1.2.0.RELEASE log opened at 2017-09-15 00" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_74] at java.lang.Long.parseLong(Long.java:578) ~[na:1.8.0_74] at java.lang.Long.parseLong(Long.java:631) ~[na:1.8.0_74] at org.jline.reader.impl.history.DefaultHistory.lambda$load$0(DefaultHistory.java:87) ~[jline-3.4.0.jar:na] at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_74] at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_74] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_74] at org.jline.reader.impl.history.DefaultHistory.load(DefaultHistory.java:85) ~[jline-3.4.0.jar:na] at org.jline.reader.impl.history.DefaultHistory.attach(DefaultHistory.java:68) ~[jline-3.4.0.jar:na] at org.jline.reader.impl.history.DefaultHistory.(DefaultHistory.java:47) ~[jline-3.4.0.jar:na] at org.springframework.shell.jline.JLineShellAutoConfiguration$HistoryConfiguration.history(JLineShellAutoConfiguration.java:133) ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1] at org.springframework.shell.jline.JLineShellAutoConfiguration$HistoryConfiguration$$EnhancerBySpringCGLIB$$9f1ea578.CGLIB$history$1() ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1] at org.springframework.shell.jline.JLineShellAutoConfiguration$HistoryConfiguration$$EnhancerBySpringCGLIB$$9f1ea578$$FastClassBySpringCGLIB$$1e9c7ba9.invoke() ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] at org.springframework.shell.jline.JLineShellAutoConfiguration$HistoryConfiguration$$EnhancerBySpringCGLIB$$9f1ea578.history() ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] ... 119 common frames omitted

    :bootRun FAILED `

    Any advice? Best Agata

    opened by themathmagician 9
  • Add pretty table rendering

    Add pretty table rendering

    This is work I have been sitting on for a while.

    It adds a rich Table rendering framework, supporting multiline rendering, text-aligning, nice border styles, text-wrapping, adaptive terminal-width support, etc.

    The entry point is class Table, having a look at its javadoc is a good idea.

    Here is a demo of the new Tables in action, using Spring XD as an example (there is some rendering artifact in the screen capture that does not appear in a real terminal):

    asciicast

    opened by ericbottard 9
  • [Enhancement]  Support component level prefix.

    [Enhancement] Support component level prefix.

    Normally, we collect the related command under the same @ShellComponent, and we may wanna add a common prefix for each command instead concat it in each @ShellMethod key.

    	@ShellComponent(prefix = "docker-prefix")
    	public static class ShellComponentWithPrefix {
    
    		@ShellMethod(value = "run")
    		public void foo1(...) {
    		}
                     
                     @ShellMethod(value = "build")
    		public void foo2(...) {
    		}
    
    	}
    

    It should be

    docker-prefix run
    docker-prefix build
    
    opened by Koooooo-7 8
  • Gradle build issue - Spring Shell 2.0.0.M1

    Gradle build issue - Spring Shell 2.0.0.M1

    Hello,

    I am having a build issue with Gradle, Spring Shell 2.0.0.M1.

    My project structure: screen shot 2017-10-05 at 2 36 40 am

    Here is the main entry point, "ExerciseMain.java" (identical to "SpringShellSample.java" in the samples folder): screen shot 2017-10-05 at 2 40 23 am

    When I do: gradle clean build, the build is successful, but ./gradlew run receives a large error:

    ./gradlew run
    :compileJava
    :processResources NO-SOURCE
    :classes
    :run
    
      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v1.3.0.RELEASE)
    
    2017-10-05 02:29:08.264  INFO 4112 --- [           main] files.ExerciseMain                       : Starting ExerciseMain on 149-160-181-249.dhcp-bl.indiana.edu with PID 4112 (/Users/joshisaacson-work/Desktop/JET_build/build/classes/main started by joshisaacson-work in /Users/joshisaacson-work/Desktop/JET_build)
    2017-10-05 02:29:08.267  INFO 4112 --- [           main] files.ExerciseMain                       : No profiles are active
    2017-10-05 02:29:08.314  INFO 4112 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@51b279c9: startup date [Thu Oct 05 02:29:08 EDT 2017]; root of context hierarchy
    2017-10-05 02:29:08.829  INFO 4112 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'iterableResultHandler' with a different definition: replacing [Generic bean: class [org.springframework.shell.result.IterableResultHandler]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-core/2.0.0.M1/7f10ac2bd9f652b68a0a644119940f19ee8d491e/spring-shell-core-2.0.0.M1.jar!/org/springframework/shell/result/IterableResultHandler.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=resultHandlerConfig; factoryMethodName=iterableResultHandler; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/shell/result/ResultHandlerConfig.class]]
    2017-10-05 02:29:09.098  INFO 4112 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.shell.SpringShellAutoConfiguration' of type [class org.springframework.shell.SpringShellAutoConfiguration$$EnhancerBySpringCGLIB$$c7c3768d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2017-10-05 02:29:09.117  INFO 4112 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'conversionService' of type [class org.springframework.core.convert.support.DefaultConversionService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2017-10-05 02:29:09.554  WARN 4112 --- [           main] org.jline                                : Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
    2017-10-05 02:29:09.772  WARN 4112 --- [           main] s.c.a.AnnotationConfigApplicationContext :.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
    2017-10-05 02:29:09.779  INFO 4112 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/Users/joshisaacson-work/Desktop/JET_build/build/classes/main/, file:/Users/joshisaacson-work/Desktop/JET_build/build/resources/main, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-starter/2.0.0.M1/817f8b4d4b0e6f7562a00c104a20c3b7f346fa24/spring-shell-starter-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/de.vandermeer/asciitable/0.3.2/96ee630413aa5a03ac5cbb34c79c95f91f417caa/asciitable-0.3.2.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-core/2.0.0.M1/7f10ac2bd9f652b68a0a644119940f19ee8d491e/spring-shell-core-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-standard/2.0.0.M1/b8384c49ab67854de0744fd943485809d9f2c6d3/spring-shell-standard-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-standard-commands/2.0.0.M1/d562b8461f6872405c4d510e000efed283b18f87/spring-shell-standard-commands-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-shell1-adapter/2.0.0.M1/f28280b2860a8003c6ed47f48a341df9943791c4/spring-shell-shell1-adapter-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-jcommander-adapter/2.0.0.M1/3554b2ea463da47d8f046194bfcf29cc839f3b0e/spring-shell-jcommander-adapter-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.shell/spring-shell-table/2.0.0.M1/aa537cdd6ee92899a221486f32a8addf33b3c3d3/spring-shell-table-2.0.0.M1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/de.vandermeer/ascii-utf-themes/0.0.1/4e6354685bb4bf62742dd8f0bc2de338e048e978/ascii-utf-themes-0.0.1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/de.vandermeer/char-translation/0.0.2/1f8a810c0b9a5b8269288b22f842b88b1262f238/char-translation-0.0.2.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/1.3.0.RELEASE/44e2cf56424b1c0cdf101cbb2582d7ff77634967/spring-boot-starter-1.3.0.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-validation/1.3.0.RELEASE/a9791affe229b42eae425486a9344a1dc13acf1c/spring-boot-starter-validation-1.3.0.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.jline/jline/3.4.0/c03fa55b14856de0ac55e5ee1ad69a59af53d7cd/jline-3.4.0.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.jline/jline-terminal-jna/3.4.0/7f8739ea413cf0dd76cf4d7a0a164ddbbed45e34/jline-terminal-jna-3.4.0.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/4.2.3.RELEASE/249921ead97248410ac04f854075f0a1c1a567e4/spring-beans-4.2.3.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/de.vandermeer/skb-interfaces/0.0.1/78940adb54f8dbcebb9b6166ebd0ff52ca124b32/skb-interfaces-0.0.1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/1.3.0.RELEASE/4939c8b549d1e2b4b8d5f57bfc404435896fe865/spring-boot-1.3.0.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/1.3.0.RELEASE/a265041d056518de098b51c2357597735ea465d/spring-boot-autoconfigure-1.3.0.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/1.3.0.RELEASE/17e106a8a13a9c98515a8eb0dae2d3d80420d666/spring-boot-starter-logging-1.3.0.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.2.3.RELEASE/3ed00dad7a16b2a28df9348294f6a67151f43cf6/spring-core-4.2.3.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.16/d64fb662c9e42789149f5078a62a22edda786c6a/snakeyaml-1.16.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.0.28/12ff86316ae8835b410461401ce8a77d040b0c5f/tomcat-embed-el-8.0.28.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-validator/5.2.2.Final/990905cd9184450c5f3e929ab2566305e3a67fa1/hibernate-validator-5.2.2.Final.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.2.2/5012450aee579c3118ff09461d5ce210e0cdc2a9/jna-4.2.2.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.jline/jline-terminal/3.4.0/b481d5ebd9ad0321700376b1339690b6e8c7598/jline-terminal-3.4.0.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.4/5fe28b9518e58819180a43a850fbc0dd24b7c050/commons-lang3-3.4.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.antlr/ST4/4.0.8/a1c55e974f8a94d78e2348fa6ff63f4fa1fae64/ST4-4.0.8.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.antlr/antlr4/4.5.1/19a08f261dc2b7e1bc58c8f1038f766dccade74c/antlr4-4.5.1.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/4.2.3.RELEASE/fb26a160d984eb9cbf01fbf38f4b17e15fdd50e1/spring-context-4.2.3.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.3/d90276fff414f06cb375f2057f6778cd63c6082f/logback-classic-1.1.3.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.slf4j/jcl-over-slf4j/1.7.13/d78d2242e14e4182625152d225f76ae52b43491d/jcl-over-slf4j-1.7.13.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.13/43759e986de5fec7045e35e9533e5ad2f6cd1b05/jul-to-slf4j-1.7.13.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.slf4j/log4j-over-slf4j/1.7.13/b5f4685073a6ffba6bf7e1d51e2b5fb83bdfa953/log4j-over-slf4j-1.7.13.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/8613ae82954779d518631e05daa73a6a954817d5/validation-api-1.1.0.Final.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.2.1.Final/fedf11b3d4665a434b554a5891fe7f208f029f45/jboss-logging-3.2.1.Final.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.1.0/dbbd699a1486ad0f2ed6f5af6cfed66acacb9056/classmate-1.1.0.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.antlr/antlr-runtime/3.5.2/cd9cd41361c155f3af0f653009dcecb08d8b4afd/antlr-runtime-3.5.2.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/4.2.3.RELEASE/6384a57a024df03bfcb1eeccd3d820da98125b92/spring-aop-4.2.3.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/4.2.3.RELEASE/67b064c726c276436387c7a183a49deda153a6cc/spring-expression-4.2.3.RELEASE.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.3/e3c02049f2dbbc764681b40094ecf0dcbc99b157/logback-core-1.1.3.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/235ba8b489512805ac13a8f9ea77a1ca5ebe3e8/aopalliance-1.0.jar, file:/Users/joshisaacson-work/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.13/7fcf30c25b8f4a9379b9dad0d3f487b25272c026/slf4j-api-1.7.13.jar]
    2017-10-05 02:29:09.787 ERROR 4112 --- [           main] o.s.boot.SpringApplication               : Application startup failed
    
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'parameterValidationExceptionResultHandler': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List org.springframework.shell.result.ParameterValidationExceptionResultHandler.parameterResolvers; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'standardParameterResolver': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.shell.standard.StandardParameterResolver.setValueProviders(java.util.Collection); nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.shell.CommandRegistry]: : Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:838) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
            at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
            at files.ExerciseMain.main(ExerciseMain.java:23) [main/:na]
    Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List org.springframework.shell.result.ParameterValidationExceptionResultHandler.parameterResolvers; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'standardParameterResolver': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.shell.standard.StandardParameterResolver.setValueProviders(java.util.Collection); nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.shell.CommandRegistry]: : Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            ... 16 common frames omitted
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'standardParameterResolver': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.shell.standard.StandardParameterResolver.setValueProviders(java.util.Collection); nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.shell.CommandRegistry]: : Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1068) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            ... 18 common frames omitted
    Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.shell.standard.StandardParameterResolver.setValueProviders(java.util.Collection); nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.shell.CommandRegistry]: : Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:661) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            ... 29 common frames omitted
    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandValueProvider' defined in class path resource [org/springframework/shell/standard/StandardAPIAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.shell.CommandRegistry]: : Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:464) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1068) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:618) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            ... 31 common frames omitted
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            ... 44 common frames omitted
    Caused by: java.lang.IllegalArgumentException: Illegal registration for command 'help': Attempt to register both 'public java.lang.CharSequence org.springframework.shell.standard.commands.Help.help(java.lang.String) throws java.io.IOException' and 'public static void files.ExerciseUI.help()'
            at org.springframework.shell.ConfigurableCommandRegistry.register(ConfigurableCommandRegistry.java:43) ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1]
            at org.springframework.shell.standard.StandardMethodTargetRegistrar.lambda$register$0(StandardMethodTargetRegistrar.java:67) ~[spring-shell-standard-2.0.0.M1.jar:2.0.0.M1]
            at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:527) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.shell.standard.StandardMethodTargetRegistrar.register(StandardMethodTargetRegistrar.java:58) ~[spring-shell-standard-2.0.0.M1.jar:2.0.0.M1]
            at org.springframework.shell.Shell.gatherMethodTargets(Shell.java:98) ~[spring-shell-core-2.0.0.M1.jar:2.0.0.M1]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
            at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
            ... 57 common frames omitted
    
    :run FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':run'.
    > Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 3.417 secs
    

    I have no clue what the issue is in this case, but I feel like it is something very simple that I am just missing. Thanks for helping me.

    opened by jsisaacs 8
  • BaseSingleItemSelector.preHandler returns null instead of this

    BaseSingleItemSelector.preHandler returns null instead of this

    This results in this error when using preHandler in a ComponentFlow using the builder: java.lang.NullPointerException: Cannot invoke "org.springframework.shell.component.flow.SingleItemSelectorSpec.next(java.util.function.Function)" because the return value of "org.springframework.shell.component.flow.SingleItemSelectorSpec.preHandler(java.util.function.Consumer)" is null

    Looks like a typo to me:

    @Override public SingleItemSelectorSpec preHandler(Consumer<SingleItemSelectorContext<String, SelectorItem<String>>> handler) { this.preHandlers.add(handler); return null; }

    opened by peterdb 0
  • Renamed the word techical to technical

    Renamed the word techical to technical

    • Changed the word occurrences in the doc content
    • Change the file names with the word techical in them. Let me know if this PR is wrong, I will close it.
    opened by srinivasu619 2
  • Document troubles developing with IDE's

    Document troubles developing with IDE's

    To make development process more easy, document issues with various IDE's as mileage vary between IntelliJ, Eclipse/STS and VSCode.

    This because running shell/cli app directly from IDE may be wrong choice mostly coming from i.e. https://github.com/spring-projects/spring-shell/discussions/534#discussioncomment-3662477. Instead letting devs banging their head to a wall, make it clear on what constraints they are working with.

    area/documentation 
    opened by jvalkeal 0
  • Feature request: ability to prefix all commands in a ShellComponent

    Feature request: ability to prefix all commands in a ShellComponent

    It would be useful to have the ability to prefix all commands defined in a ShellComponent. For instance:

    @ShellComponent(prefix = "backend")
    public class BackendCommands {
    
        @ShellMethod("Connect to the backend.")
        public void connect(String token) throws Exception {
            ...
        }
    }
    

    This would result in a "backend.connect" command.

    A prefix ability would allow more consistency in command naming. For instance, you could also have "db.connect" and "kibana.connect" commands. Furthermore, using command line completion after typing the "backend" prefix would give you a nice overview of all backend related commands.

    opened by klr8 0
Releases(v3.0.0-M3)
  • v3.0.0-M3(Dec 1, 2022)

    Generic Notes

    Fixes

    This milestone uses Spring Boot 3.0.0 and contains some notable changes:

    • Usual bug fixes
    • New testing modules

    Issues

    #576 Build sample with musl on linux #575 ShellOption not registered without hyphens #574 Upgrade spring-boot 3.0.0 #572 Method execution should not error without value #568 Upgrade spring-boot 3.0.0-RC2 #567 Handle whitespace in option value #565 Auto-config classes should use @AutoConfiguration #558 Docs updates #552 Fix e2e flow.test.ts locally #516 JLine Terminal should be configurable #489 Provide a testing framework

    Source code(tar.gz)
    Source code(zip)
  • v2.1.4(Dec 1, 2022)

    Generic Notes

    Fixes

    This GA contains some notable changes:

    • Builds on Spring Boot 2.7.6
    • Some bug fixes backported

    Issues

    #577 backport(575) ShellOption not registered without hyphens #573 backport(572) Method execution should not error without value #571 Upgrade spring-boot 2.7.6 #570 backport(567) Handle whitespace in option value

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-M2(Oct 24, 2022)

    Generic Notes

    Fixes

    This milestone uses Spring Boot 3.0.0-RC1 and contains some notable changes:

    • Hidden commands
    • Truncate long text in components
    • Better exception handling
    • More descriptive error message when required option is not present
    • New PathSearch Component

    Here are some screencasts for new functionality.

    m2-hidden m2-pathsearch m2-truncate

    Issues

    #561 Make assertj dependency optional #557 Upgrade spring-boot 3.0.0-RC1 #556 PathSearch component #555 Docs updates #548 Parser should process types #543 Components should truncate long text #503 More descriptive error message when required option is not present #416 Support hidden commands

    Source code(tar.gz)
    Source code(zip)
  • v2.1.3(Oct 24, 2022)

    Generic Notes

    Fixes

    This GA contains some notable changes:

    • Builds on Spring Boot 2.7.5
    • Some bug fixes backported

    Issues

    #549 backport(548) Parser should process types #547 Upgrade spring-boot 2.7.5

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-M1(Oct 4, 2022)

    Generic Notes

    Fixes

    This milestone contains some notable changes:

    • Using Spring Boot 3.x
    • Support for GraalVM mostly complete
    • Project is now build with gradle

    Issues

    #540 Upgrade native-build-tools 0.9.14 #535 Fix release workflows for gradle #529 Improve JPMS support by adding Automatic-Module-Name #527 Docs changes #526 Prevent ExtendedDefaultParser warning #525 Add starter for jansi #524 Move starter modules under starters #523 Upgrade spring-boot 3.0.0-M5 #521 Could not find org.springframework.shell:spring-shell-management:3.0.0-SNAPSHOT. #510 next does not work as expected in ComponentFlow #506 Upgrade gradle 7.5.1 #504 Split builtin command docs #495 Incorrect completion for options #493 Spring shell is defaulting to the base Jakarta validator #490 Provide needed aot configs #486 Build publish broken #470 Switch to gradle #385 Rework for boot 3.x

    PRs

    #520 Docs correctness!

    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Oct 4, 2022)

    Generic Notes

    Fixes

    This GA contains some notable changes:

    • Builds on Spring Boot 2.7.4
    • Some bug fixes backported

    Issues

    #538 Upgrade spring-boot 2.7.4 #513 backport(510) next does not work as expected in ComponentFlow

    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Aug 19, 2022)

    Generic Notes

    Fixes

    This GA contains some notable changes:

    • Builds on Spring Boot 2.7.3
    • Some bug fixes backported

    Issues

    #505 backport(504) Split builtin command docs #500 Upgrade spring-boot 2.7.3 #498 backport(495) Incorrect completion for options #496 backport(493) Spring shell is defaulting to the base Jakarta validator

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Jul 23, 2022)

    Generic Notes

    Fixes

    This GA contains some notable changes:

    • Builds on Spring Boot 2.7.2
    • Some styling changes
    • Help commands now knows about aliases
    • MultiItemSelector component can now have items selected on default
    • Some fixes on @ShellOption

    Issues

    #480 Add commands as list in help templating #477 Upgrade to Spring Boot 2.7.2 #476 Component styling bad for black on white #461 ShellOption booleans are now mandatory in 2.1.0-RC1 #458 Help should group commands with aliases #454 Create GA release workflow #446 Missing option error without ShellOption #426 Add aliases info to help

    PRs

    #468 Add the possibility of default selection to MultiItemSelector #455 Fix typos in using-shell-options-optional.adoc

    Additional Notes

    Recap

    Earlier this year we started an effort align the project with latest Spring Boot and Spring Framework versions as it was difficult to use existing Spring Shell release of a spring family.

    Originally the main issue we wanted to address was a removal of a bean cycles which Spring Boot is now enforcing by default. While this feature can be turned off it is not something Spring Shell should require. This required a lot of changes and we chose to handle it with rework of a shell internals. One big challenge was how the old Spring Shell worked by essentially keeping command info methods backed by @ShellMethod annotations and then calling those methods via reflection using not so well defined ways.

    Now that it was clear that we needed to do a bigger overhaul it made sense to do further development now rather than waiting for Spring Boot 3 and Spring Framework 6 which Spring Shell eventually would have needed to support.

    Here is a recap of the changes that were done:

    Command Registration

    CommandRegistration is a new programmatic way to define commands. The existing annotation model of commands translates to these registration behind a scene. This new registration model now allows to us control commands dynamically which wasn't the case in the old shell implementation.

    Existing Annotations

    What comes for @ShellMethod and @ShellOption We've tried to keep those compatible and future development will most likely introduce new annotations more aligned with CommandRegistration.

    Theming

    Modern terminal implementations are not bound to just show a simple text, but allow for different types of font styles and can be used with colors. In the old Spring Shell these were mostly hard coded while it was possible to use ANSI sequences via JLine to write anything into a console. It made sense to introduce a theming system where text written can be styled and figures chosen per style. Figures are just unicode characters supported by modern terminals which is the basis for creating pretty shell UI's.

    sample-style-list

    sample-figure-list

    UI Components

    You've mostly likely used various CLI tools which go beyond just asking some text from a user and then doing something based on that. For example GitHub CLI is a good example as some of its commands enter interactive mode and ask users for input using various tricks like selector lists and other sort of shell style forms.

    What we wanted to accomplish in Spring Shell was to create these components which can be use independently or combine those into a flow.

    component-flow-showcase-1

    Graal

    A big topic in a future Spring Framework release is native compilation with GraalVM. This obviously makes a big impact on the CLI side as that little jvm bootstrap timeout goes away when your existing code is translated into native binary.

    With 2.1.x it was shown using our experimental Spring Native project that it is possible to create a Spring Shell application which works the same way in Linux, MacOS and Windows.

    sample-version-linux

    sample-version-win

    sample-version-macos

    Official support for GraalVM in Spring Shell comes with 3.x.

    Templating

    Writing a command into a terminal is easy as you essentially just write something. However what we've done in some of the built-in commands like help is not always something a user wants to have or they may have other reasons to modify how it looks. Some default outputs from Spring Shell are now based on templates based on ST4 from the ANTRL project.

    This allows a user to replace templates used in Spring Shell and modify default behaviour. These templates also integrate into the theme framework so that it's possible to define templates per active theme.

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-RC1(Jul 7, 2022)

    Generic Notes

    Fixes With this release candidate some notable changes were done.

    • Dynamic availability implemented
    • Theming functionality went through a rework
    • Interactive mode completion went through a rework
    • Experimental spring native support is now complete
    • Some tweaks to make interactive commands to fail fast in non-tty envs

    Issues

    #452 Separate commit and push in release workflow #449 Rework interactive completion #445 ConfirmationInput should have resultValue #444 Components can't use interactive mode without tty #442 Rework themes support #433 Update Docs #423 Fix Availability #323 add support to spring-native

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-M5(Jun 8, 2022)

    Generic Notes

    Fixes This release has a fixes to few issues found in a previous milestone.

    Issues

    #437 Exit code customisation broken #436 Option with @ShellOption not marked as required #435 Fix ConversionService auto-config #431 Add support for exit codes #424 Support option label #401 Testing e2e

    PRs

    #432 Capturing CTRL+D (EOF) to exit the shell

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-M4(May 30, 2022)

    Generic Notes

    Notable Changes

    • Project has been updated to Boot 2.7.0
    • Command sub-system has been rewritten
    • Support registering commands dynamically
    • Execution target can now also be Function or Consumer
    • Build-in help command is rendered via a template

    Issues

    #427 Better errors with non-interactive mode #422 Rework help command #421 Change help to description in command registration #420 Expose CommandRegistration in CommandContext #419 Update boot 2.7.0 #417 Support defining history file location #414 Expose default option in SingleItemSelector #411 Update boot 2.6.7 #409 Default values not used correctly #407 Make samples to require jdk11 #400 Parameter 0 of method standardParameterResolver in ParameterResolverAutoConfiguration is error #395 Drop jcommander #394 Drop spring-shell-test-samples #387 Add auto-config for ComponentFlow #383 Update docs #382 Update boot 2.6.4 #380 Rework command subsystem #379 Register commands dynamically #364 Flow system for UI components #340 Native support for JCommander #333 Remove legacy support for shell 1.x

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-M3(Feb 24, 2022)

    Generic Notes

    Notable Changes With usual small enhancements this release contains initial work to add higher level UI Component model which makes it easier to build beautiful interactions with a user. See more from samples and docs but below screencast shows the idea.

    screencast

    Issues

    #366 Add confirmation component #363 Consider a different version output if no properties are set #361 Update docs #360 UI component model

    PRs

    #372 Add support for multiple non-interactive commands

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-M2(Feb 3, 2022)

    Generic Notes

    Notable Changes

    • Where's 2.1.0-M1, see #356
    • New build-in version command
    • Separate starter for cases you need to use jna
    • Customizer for non-interactive runner
    • New styling and theming subsystem

    Issues

    #357 Create starter for jna #356 3.0.x(main) to 2.1.x #354 Update Docs #353 Add styling system #352 Add build-in support for version command #351 Fix javadoc publish #347 Change or remove group of "Built-in Commands" #293 Handling CommandNotFound exceptions

    PRs

    #358 Add non-interactive shell runner customizer

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-M1(Jan 28, 2022)

    Generic Notes

    NOTE: This used to be 3.0.0-M1, see #356

    Notable Changes

    • Project has been updated to Spring Boot 2.6.x line.
    • Re-work to remove bean cycles which caused issues with boot 2.6.x.
    • We're now starting to have a working support for spring-native.
    • Autoconfiguration has been moved into its own module.
    • Changes in a use of Boot's ApplicationRunner with new shell related interface ShellRunner.
    • Better build-in support for non-interactive mode(looking at you spring-native)
    • Completion script support for bash to ease tab-tab completion in non-interactive mode.

    Issues

    #350 Update boot 2.6.3 #345 Separate interactive and non-interactive commands #343 Add support for bash completion #342 Support non-interactive shell commands #339 Update boot 2.6.2 #336 Refactor ResultHandler type hierachy #331 Update jline 3.21.0 #330 Update maven wrapper #329 Extract auto-config into separate module #328 Publish snapshots from workflows #326 Build support for jdk 11/17 #325 Update boot 2.6.1 #324 Boot 2.6.x beans form a cycle

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0.M1(Sep 16, 2017)

Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

null 847 Nov 26, 2022
Java library for creating text-based GUIs

Lanterna Lanterna is a Java library allowing you to write easy semi-graphical user interfaces in a text-only environment, very similar to the C librar

null 2k Dec 31, 2022
Annotation-based command framework for Minestom

Minestand Annotation-based command framework for Minestom Advantages over other frameworks Minestand works by converting your classes into Minestom co

null 6 Aug 27, 2022
A webshell application and interactive shell for pentesting Apache Tomcat servers.

Apache Tomcat webshell application for RCE A webshell application and interactive shell for pentesting Apache Tomcat servers. Features Webshell plugin

Podalirius 61 Jan 1, 2023
A webshell application and interactive shell for pentesting Apache Tomcat servers.

Apache Tomcat webshell application for RCE A webshell application and interactive shell for pentesting Apache Tomcat servers. Features Webshell plugin

Podalirius 56 Aug 7, 2022
Unixcounter - The new unixcounter project. Based on JavaEE + VueJS (server) and POSIX shell (client)

The Unix Counter Table of Contents Description Contributing Documentation Installation License This is the successor of the Linux Counter Project, whi

The Linux Counter Project 9 Dec 23, 2022
Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.

Apache Zeppelin Documentation: User Guide Mailing Lists: User and Dev mailing list Continuous Integration: Contributing: Contribution Guide Issue Trac

The Apache Software Foundation 5.9k Jan 8, 2023
Tic-Tac-Toe-GUI - This repository contains Java based interactive Tic-Tac-Toe game.

Tic-Tac-Toe This repository contains Java based interactive Tic-Tac-Toe game. In this game you can play individual or with another player with your na

Ahmed Hossam 11 Sep 1, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
The shell for the Java Platform

______ .~ ~. |`````````, .'. ..'''' | | | |'''|''''' .''```. .'' |_________| |

CRaSH Repositories 916 Dec 30, 2022
A project provide a shell to talk to ratis server

ratis-shell A project provide a shell to talk to ratis server how to build mvn clean package how to run Prepare a config file cp ./conf/ratis-shell-si

null 17 Dec 1, 2022
A virtual Linux shell environment application for Android OS. Runs Alpine Linux in QEMU system emulator. Termux app fork.

vShell (Virtual Shell) — a successor of Termux project which provides an alternate implementation of the Linux terminal emulator for Android OS.

null 2 Feb 1, 2022
A library for creating interactive console applications in Java

Text-IO Text-IO is a library for creating Java console applications. It can be used in applications that need to read interactive input from the user.

Beryx 295 Jan 5, 2023
Sourcetrail - free and open-source interactive source explorer

Sourcetrail Sourcetrail is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code. Windows: Lin

Coati Software 13.2k Jan 5, 2023
ThirdEye is an integrated tool for realtime monitoring of time series and interactive root-cause analysis.

ThirdEye is an integrated tool for realtime monitoring of time series and interactive root-cause analysis. It enables anyone inside an organization to collaborate on effective identification and analysis of deviations in business and system metrics. ThirdEye supports the entire workflow from anomaly detection, over root-cause analysis, to issue resolution and post-mortem reporting.

null 87 Oct 17, 2022
Sniffy - interactive profiler, testing and chaos engineering tool for Java

Sniffy Sniffy is a Java profiler which shows the results directly in your browser. It also brings profiling to your unit (or rather component) tests a

Sniffy 139 Dec 23, 2022
A tool to create flags for Paradox Interactive games.

Iron Workshop Flag Creator Instllation and Usage Instructions Instructional video here: https://youtu.be/0a8xXvN_ygk Flag Creator Purpose and Use The

null 5 Sep 11, 2022
Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data.

Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data. Tripoli facilitates visualization of temporal trends and scatter during measurement, statistically rigorous filtering of data, and calculation of statistical parameters.

CIRDLES 7 Dec 15, 2022
Drifty is an open-source interactive File Downloader system built with java. It is currently available in CLI mode and has the GUI version under active development.

Drifty Drifty is an open-source interactive File Downloader system built using Java. It takes the link to the file, the directory where it needs to be

Saptarshi Sarkar 60 Dec 24, 2022
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.5k Dec 30, 2022