本文整理汇总了Java中org.springframework.shell.Bootstrap.getJLineShellComponent方法的典型用法代码示例。如果您正苦于以下问题:Java Bootstrap.getJLineShellComponent方法的具体用法?Java Bootstrap.getJLineShellComponent怎么用?Java Bootstrap.getJLineShellComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.shell.Bootstrap
的用法示例。
在下文中一共展示了Bootstrap.getJLineShellComponent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startUp
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
@Before
public void startUp() throws InterruptedException {
applicationName = "App" + new Random().nextInt(10000);
Bootstrap bootstrap = new Bootstrap();
shell = bootstrap.getJLineShellComponent();
}
示例2: exists
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
public void exists() throws Exception {
Bootstrap bootstrap = new Bootstrap();
JLineShellComponent shell = bootstrap.getJLineShellComponent();
CommandResult cr = shell.executeCommand("exists /analytics");
assertEquals(true, cr.isSuccess());
}
示例3: getJLineShell
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
private JLineShell getJLineShell(Bootstrap bs) {
if (bs instanceof LensBootstrap) {
return ((LensBootstrap) bs).getLensJLineShellComponent();
} else {
return bs.getJLineShellComponent();
}
}
示例4: run
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
protected void run(String[] args)
{
ServerConfigHelper.initConfig("env.properties");
ServerConfigHelper.initLog4j("log4j-shell.xml");
DomainMapperHelper.scanMapperRegistryClass();
System.setProperty("jline.WindowsTerminal.directConsole", "false");
String[] contextPath={ "gemlite-shell.xml" };
bootstrap = new Bootstrap(args,contextPath);
shell = (GShellComponent)bootstrap.getJLineShellComponent();
shell.setDevelopmentMode(true);
shell.addShellStatusListener(new ShellStatusListener()
{
@Override
public void onShellStatusChange(ShellStatus oldStatus, ShellStatus newStatus)
{
if(newStatus.getStatus()==Status.STARTED)
{
DomainMapperHelper.scanMapperRegistryClass();
shell.executeCommand("connect");
shell.executeCommand("mn connect");
}
}
});
shell.start();
shell.waitForComplete();
}
示例5: init
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
public void init() {
Bootstrap bootstrap = new Bootstrap(null,
new String[]{"classpath*:/META-INF/spring/spring-shell-plugin-test.xml"});
shell = bootstrap.getJLineShellComponent();
applicationContext = bootstrap.getApplicationContext();
ssaw = applicationContext.getBean(StratioStreamingApiWrapper.class);
IStratioStreamingAPI stratioStreamingAPI = applicationContext.getBean(IStratioStreamingAPI.class);
Mockito.when(stratioStreamingAPI.isInit()).thenReturn(true);
}
示例6: SlangCliTest
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
public SlangCliTest() {
Bootstrap bootstrap = new Bootstrap(null, CONTEXT_PATH);
shell = bootstrap.getJLineShellComponent();
scoreServicesMock = (ScoreServices) bootstrap.getApplicationContext().getBean("scoreServices");
compilerHelperMock = (CompilerHelper) bootstrap.getApplicationContext().getBean("compilerHelper");
slangCli = bootstrap.getApplicationContext().getBean(SlangCli.class);
}
示例7: startUp
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
@BeforeClass
public static void startUp() throws InterruptedException {
Bootstrap bootstrap = new Bootstrap();
shell = bootstrap.getJLineShellComponent();
}
开发者ID:UrielSarrazin,项目名称:partial-pressure-calculator,代码行数:6,代码来源:PartialPressureCommandIntegrationTest.java
示例8: startShell
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
@Before
public void startShell() throws IOException, InterruptedException, AccumuloException, AccumuloSecurityException {
// Bootstrap the shell with the test bean configuration.
bootstrap = new Bootstrap(new String[]{}, new String[]{"file:src/test/resources/RyaShellTest-context.xml"});
shell = bootstrap.getJLineShellComponent();
}
示例9: startUp
import org.springframework.shell.Bootstrap; //导入方法依赖的package包/类
@BeforeClass
public static void startUp() throws InterruptedException {
Bootstrap bootstrap = new Bootstrap();
shell = bootstrap.getJLineShellComponent();
}