Move InputProvider to top-level

This commit is contained in:
Eric Bottard
2017-08-09 17:43:46 +02:00
parent 885e22ea0f
commit a7d9ababa0
5 changed files with 27 additions and 12 deletions

View File

@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.shell.ParameterResolver;
import org.springframework.shell.Shell;
/**
* Creates beans for standard commands.
@@ -59,4 +60,11 @@ public class StandardCommandsAutoConfiguration {
public Stacktrace stacktrace() {
return new Stacktrace();
}
@Bean
@ConditionalOnMissingBean(Script.Command.class)
@ConditionalOnProperty(prefix = "spring.shell.command.script", value = "enabled", havingValue = "true", matchIfMissing = true)
public Script script(Shell shell) {
return new Script(shell);
}
}