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 Decouple ApplicationRunners Make ThrowableResultHandler behave differently in non-interactive mode
This commit is contained in:
@@ -36,8 +36,6 @@ public class CommandValueProvider extends ValueProviderSupport {
|
||||
|
||||
private final CommandRegistry commandRegistry;
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
public CommandValueProvider(CommandRegistry commandRegistry) {
|
||||
this.commandRegistry = commandRegistry;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.shell.standard;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.shell.CommandRegistry;
|
||||
import org.springframework.shell.MethodTargetRegistrar;
|
||||
@@ -33,7 +34,7 @@ import org.springframework.shell.ParameterResolver;
|
||||
public class StandardAPIAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
public ValueProvider commandValueProvider(CommandRegistry commandRegistry) {
|
||||
public ValueProvider commandValueProvider(@Lazy CommandRegistry commandRegistry) {
|
||||
return new CommandValueProvider(commandRegistry);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user