本文整理匯總了Java中org.springframework.boot.SpringApplication.setBannerMode方法的典型用法代碼示例。如果您正苦於以下問題:Java SpringApplication.setBannerMode方法的具體用法?Java SpringApplication.setBannerMode怎麽用?Java SpringApplication.setBannerMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.boot.SpringApplication
的用法示例。
在下文中一共展示了SpringApplication.setBannerMode方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(final String[] args) {
System.setProperty("vertx.disableDnsResolver", "true");
System.setProperty("vertx.logger-delegate-factory-class-name", "io.vertx.core.logging.SLF4JLogDelegateFactory");
final File logbackFile = new File("logback.xml");
if (logbackFile.exists()) {
System.setProperty("logging.config", logbackFile.getAbsolutePath());
}
final SpringApplication application = new SpringApplication(GatewayMS.class);
application.setBannerMode(Mode.OFF);
application.setWebEnvironment(false);
application.run(args);
}
示例2: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setBannerMode(Banner.Mode.OFF);
app.setLogStartupInfo(false);
app.setRegisterShutdownHook(false);
Map<String, Object> pro = Maps.newHashMap();
pro.put("logging.level.root", "ERROR");
app.setDefaultProperties(pro);
app.run(args);
}
示例3: run
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
protected static void run(Class cls, String[] args)
{
SpringHolder.setArgs(args);
Q2Mods.patchQ2();
System.setProperty("spring.config.location", "file:cfg/");
SpringApplication app = new SpringApplication(JPosApplication.class, cls);
app.setBannerMode(Mode.OFF);
app.run(args);
}
示例4: registerAndRefresh
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
protected void registerAndRefresh(String[] args, Class<?>... annotatedClasses) {
String[] nullSafeArgs = args == null ? EMPTY_ARGS : Stream.of(args).map(arg -> "--" + arg).toArray(String[]::new);
assertTrue("Context parameters must use '=' to separate name and value: " + Arrays.toString(args),
Stream.of(nullSafeArgs).allMatch(arg -> arg.indexOf('=') > 0)
);
SpringApplication app = new SpringApplication((Object[])annotatedClasses);
app.setBannerMode(Banner.Mode.OFF);
ctx = app.run(nullSafeArgs);
allCtx.add(ctx);
}
示例5: run
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
/**
* Bootstrap the microservice application.
*
* @param applicationClass
* JAX-RS Application class
* @param extraSources
* extra source classes.
* @param args
* command line arguments
*/
public static void run(final Class<? extends Application> applicationClass,
final Class<?>[] extraSources,
final String... args) {
if (!microserviceEngineIterator.hasNext()) {
throw new LinkageError("No MicroserviceEngine was defined");
}
final MicroserviceEngine microserviceEngine = microserviceEngineIterator.next();
if (microserviceEngineIterator.hasNext()) {
throw new LinkageError(format("Multiple MicroserviceEngine was defined, %s, %s and possibly more", microserviceEngine, microserviceEngineIterator.next()));
}
if (Microservice.applicationClass != null) {
throw new LinkageError("Another Application class has already been registered in this JVM.");
}
Microservice.applicationClass = applicationClass;
final Object[] bootstrapObjects = microserviceEngine.bootstrap();
final Object[] sources = new Object[extraSources.length + bootstrapObjects.length];
System.arraycopy(extraSources, 0, sources, 0, extraSources.length);
System.arraycopy(bootstrapObjects, 0, sources, extraSources.length, bootstrapObjects.length);
final SpringApplication springApplication = new SpringApplication(sources);
springApplication.setWebEnvironment(false);
springApplication
.setBannerMode(Mode.OFF);
springApplication.run(args);
}
示例6: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String... args) {
final SpringApplication app = new SpringApplication(MongoMigration.class);
app.setBannerMode(Banner.Mode.OFF);
boolean hasError = false;
try (ConfigurableApplicationContext context = app.run(args)) {
context.getBean(MongoDbMigrationService.class).runDatabaseMigration();
} catch (IOException e) {
hasError = true;
log.error("Error while running database-migration: {}", e.getMessage(), e);
}
if (hasError) System.exit(1);
}
示例7: run
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
@Override
public void run(ApplicationArguments args) throws Exception {
SpringApplication app = new SpringApplication(Lyre.class);
String[] arguments = RunnerUtils.buildArguments(app.getMainApplicationClass().getAnnotation(EnableLyre.class));
app.setMainApplicationClass(Lyre.class);
app.setBannerMode(Banner.Mode.OFF);
app.run(arguments);
}
示例8: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(MintingApplication.class);
app.setBannerMode(Banner.Mode.OFF);
app.setWebEnvironment(false);
app.run(args);
}
示例9: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(RatesApplication.class);
app.setBannerMode(Banner.Mode.OFF);
app.setWebEnvironment(false);
app.run(args);
}
示例10: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(SpringBootDemoApplication.class);
springApplication.setBannerMode(Banner.Mode.OFF);
springApplication.run();
}
示例11: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app=new SpringApplication(CcSApplication.class);
app.setBannerMode(Banner.Mode.OFF);//關閉banner
app.run(args);
}
示例12: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(ScouterPulseApplication.class);
app.setBannerMode(Mode.OFF);
app.run(args);
}
示例13: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication application = new SpringApplication(IlyaApplication.class);
application.setBannerMode(Banner.Mode.OFF);
application.run(args);
}
示例14: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setBannerMode(Banner.Mode.OFF);
app.run(args);
}
示例15: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(CrowDemon.class);
app.setBannerMode(Banner.Mode.OFF);
app.setWebEnvironment(false);
app.run(args);
}