本文整理了Java中org.springframework.shell.Bootstrap
类的一些代码示例,展示了Bootstrap
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bootstrap
类的具体详情如下:
包路径:org.springframework.shell.Bootstrap
类名称:Bootstrap
[英]Loads a Shell using Spring IoC container.
[中]使用Spring IoC容器加载外壳。
代码示例来源:origin: uber/hudi
/**
* Main class that delegates to Spring Shell's Bootstrap class in order to simplify debugging inside an IDE
*/
public static void main(String[] args) throws IOException {
Bootstrap.main(args);
}
}
代码示例来源:origin: apache/lens
@BeforeClass
public static void startUp() throws InterruptedException {
Bootstrap bootstrap = new Bootstrap();
shell = bootstrap.getJLineShellComponent();
}
代码示例来源:origin: org.springframework.shell/spring-shell
public static void main(String[] args) throws IOException {
sw.start();
ExitShellRequest exitShellRequest;
try {
bootstrap = new Bootstrap(args);
exitShellRequest = bootstrap.run();
}
catch (RuntimeException t) {
throw t;
}
finally {
HandlerUtils.flushAllHandlers(Logger.getLogger(""));
}
System.exit(exitShellRequest.getExitCode());
}
代码示例来源:origin: org.springframework.shell/spring-shell
public Bootstrap(String[] args, String[] contextPath) {
try {
commandLine = SimpleShellCommandLineOptions.parseCommandLine(args);
}
catch (IOException e) {
throw new ShellException(e.getMessage(), e);
}
ctx = new GenericApplicationContext();
ctx.registerShutdownHook();
configureApplicationContext(ctx);
// built-in commands and converters
ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(ctx);
if (commandLine.getDisableInternalCommands()) {
scanner.scan("org.springframework.shell.converters", "org.springframework.shell.plugin.support");
}
else {
scanner.scan("org.springframework.shell.commands", "org.springframework.shell.converters",
"org.springframework.shell.plugin.support");
}
// user contributed commands
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(ctx);
reader.loadBeanDefinitions(contextPath);
ctx.refresh();
}
代码示例来源:origin: Treeptik/cloudunit
@Before
public void startUp() throws InterruptedException {
applicationName = "App" + new Random().nextInt(10000);
Bootstrap bootstrap = new Bootstrap();
shell = bootstrap.getJLineShellComponent();
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
public static void main(String[] args) throws Exception {
Bootstrap.main(args);
}
}
代码示例来源:origin: avast/hdfs-shell
public void exists() throws Exception {
Bootstrap bootstrap = new Bootstrap();
JLineShellComponent shell = bootstrap.getJLineShellComponent();
CommandResult cr = shell.executeCommand("exists /analytics");
assertEquals(true, cr.isSuccess());
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
public static void main(String[] args) throws Exception {
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
public static void main(String[] args) throws Exception {
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
public static void main(String[] args) throws Exception {
Bootstrap.main(args);
}
}
代码示例来源:origin: Stratio/Decision
public static void main(String[] args) throws IOException {
Bootstrap.main(args);
}
代码示例来源:origin: jamespan/pdf-smart-crop
public static void main(String[] args) throws IOException {
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
/**
* <p>Set Hazelcast logging type and let
* Spring do the rest.
* </p>
*
* @param args From command line
*/
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.logging.type", "slf4j");
Bootstrap.main(args);
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
/**
* <P>
* As not using {@code SpringApplication.run()}, need to set logging type
* manually.
* </P>
*/
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.logging.type", "slf4j");
Bootstrap.main(args);
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
/**
* Set Hazelcast logging type and let
* Spring do the rest.
*
* @param args from the command line
*/
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.logging.type", "slf4j");
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
/**
* Start Spring. Indirectly, a Hazelcast server instance is created in
* this JVM by {@link com.hazelcast.samples.spi.ApplicationConfig ApplicationConfig}.
*
* @param args From command line
*/
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.logging.type", "slf4j");
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-jet-demos
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.logging.type", "slf4j");
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
/**
* Launch Spring Shell, pulling in Spring beans for Hazelcast and added
* command line interpreter commands.
*
* Spring Shell expects XML style config, in
* {@code classpath:/META-INF/spring/spring-shell-plugin.xml}.
*
* @param args From the O/s to pass on
* @throws Exception Allow failure
*/
// TODO: Convert to Spring Boot
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.logging.type", "slf4j");
Bootstrap.main(args);
}
}
代码示例来源:origin: hazelcast/hazelcast-code-samples
/**
* Set Hazelcast logging type and JCache control
* invariants and let Spring do the rest.
*
* @param args from the command line
*/
public static void main(String[] args) throws Exception {
System.setProperty("hazelcast.jcache.provider.type", "client");
System.setProperty("hazelcast.logging.type", "slf4j");
System.setProperty("spring.cache.jcache.provider",
"com.hazelcast.client.cache.impl.HazelcastClientCachingProvider");
System.setProperty("spring.cache.type", "jcache");
Bootstrap.main(args);
}
}
代码示例来源:origin: CloudSlang/cloud-slang
public static void main(String[] args) throws IOException {
loadUserProperties();
System.out.println("Loading..");
Bootstrap.main(args);
}
内容来源于网络,如有侵权,请联系作者删除!