use of org.springframework.boot.SpringApplication in project sofa-ark by alipay.
the class IntrospectBizEndpointOnArkEnabledTest method testIntrospectBizEndpoint.
@Test
public void testIntrospectBizEndpoint() {
SpringApplication springApplication = new SpringApplication(IntrospectBizEndpointOnArkDisabledTest.EmptyConfiguration.class);
ConfigurableApplicationContext applicationContext = springApplication.run(new String[] {});
Assert.assertTrue(applicationContext.containsBean("introspectBizEndpoint"));
Assert.assertTrue(applicationContext.containsBean("introspectBizEndpointMvcAdapter"));
applicationContext.close();
}
use of org.springframework.boot.SpringApplication in project incubator-dubbo-spring-boot-project by apache.
the class DubboServletContainerProviderBootstrap method main.
public static void main(String[] args) {
// Run as the generic Spring Boot Web(Servlet) Application
SpringApplication application = new SpringApplication(DubboServletContainerProviderBootstrap.class);
application.setWebApplicationType(WebApplicationType.SERVLET);
application.run(args);
}
use of org.springframework.boot.SpringApplication in project jphp by jphp-compiler.
the class PWebServer method __construct.
@Signature
public void __construct(Invoker invoker) {
application = new SpringApplication(WebServerConfig.class);
defaultProperties = new HashMap<>();
defaultProperties.put("_server.id", id);
defaultProperties.put("server.port", 8080);
application.setDefaultProperties(defaultProperties);
onRequest = invoker;
importAutoloaders = true;
isolated = true;
hotReload = true;
WebServerController.registerServer(this);
}
use of org.springframework.boot.SpringApplication in project spring-boot by spring-projects.
the class AutoConfigurationReportLoggingInitializerTests method logsDebugOnError.
@Test
public void logsDebugOnError() {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
this.initializer.initialize(context);
context.register(ErrorConfig.class);
try {
context.refresh();
fail("Did not error");
} catch (Exception ex) {
this.initializer.onApplicationEvent(new ApplicationFailedEvent(new SpringApplication(), new String[0], context, ex));
}
assertThat(this.debugLog.size()).isNotEqualTo(0);
assertThat(this.infoLog.size()).isEqualTo(0);
}
use of org.springframework.boot.SpringApplication in project spring-boot by spring-projects.
the class AutoConfigurationReportLoggingInitializerTests method noErrorIfNotInitialized.
@Test
public void noErrorIfNotInitialized() throws Exception {
this.initializer.onApplicationEvent(new ApplicationFailedEvent(new SpringApplication(), new String[0], null, new RuntimeException("Planned")));
assertThat(this.infoLog.get(0)).contains("Unable to provide auto-configuration report");
}
Aggregations