本文整理匯總了Java中org.springframework.boot.SpringApplication.setWebEnvironment方法的典型用法代碼示例。如果您正苦於以下問題:Java SpringApplication.setWebEnvironment方法的具體用法?Java SpringApplication.setWebEnvironment怎麽用?Java SpringApplication.setWebEnvironment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.boot.SpringApplication
的用法示例。
在下文中一共展示了SpringApplication.setWebEnvironment方法的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: 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);
}
示例3: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
((ch.qos.logback.classic.Logger) logger).setLevel(ch.qos.logback.classic.Level.TRACE);
SpringApplication app = new SpringApplication(new Object[]{ScooldServer.class});
initConfig();
app.setAdditionalProfiles(Config.ENVIRONMENT);
app.setWebEnvironment(true);
app.run(args);
}
示例4: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication sa = new SpringApplication(Launcher.class);
sa.setWebEnvironment(true);
sa.run(args);
String os = System.getProperty("os.name");
log.info("OS: " + System.getProperty("os.name") + ", Arch: " + System.getProperty("os.arch"));
if ((os.contains("Windows") || os.contains("Linux"))
&& !System.getProperty("os.arch").equalsIgnoreCase("arm")
&& !System.getProperty("os.arch").equalsIgnoreCase("arm-linux")
) {
SocketContext.nasSupported = true;
log.info("JDA-NAS supported system detected. Enabled native audio sending.");
Integer customBuffer = config.getBufferDurationMs();
if (customBuffer != null) {
log.info("Setting buffer to {}ms", customBuffer);
} else {
log.info("Using default buffer");
}
} else {
log.warn("This system and architecture appears to not support native audio sending! "
+ "GC pauses may cause your bot to stutter during playback.");
}
}
示例5: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(BotOrchestratorApplication.class);
app.setWebEnvironment(false);
ConfigurableApplicationContext ctx = app.run(args);
}
示例6: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) throws InterruptedException {
SpringApplication springApplication = new SpringApplication(Application.class);
springApplication.setWebEnvironment(false);
springApplication.run(args);
}
示例7: 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);
}
示例8: 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);
}
示例9: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication application = new SpringApplication(ReleaserApplication.class);
application.setWebEnvironment(false);
application.run(args);
}
示例10: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(TicketBookingBackEndApplication.class);
app.setWebEnvironment(true);
app.run(args);
}
示例11: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(MessageApplication.class);
springApplication.setWebEnvironment(false);
springApplication.run(args);
logger.info("SpringBoot lemon-message Start Success");
}
示例12: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setWebEnvironment(false);
app.run(args);
}
示例13: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setWebEnvironment(false);
app.run(args);
}
示例14: main
import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
SpringApplication app = new SpringApplication(App.class);
app.setWebEnvironment(false);
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);
}