List of usage examples for org.springframework.boot.web.servlet.context AnnotationConfigServletWebServerApplicationContext refresh
@Override public final void refresh() throws BeansException, IllegalStateException
From source file:org.springframework.boot.actuate.autoconfigure.metrics.PublicMetricsAutoConfigurationTests.java
private void loadWeb(Class<?>... config) { AnnotationConfigServletWebServerApplicationContext context = new AnnotationConfigServletWebServerApplicationContext(); if (config.length > 0) { context.register(config);/* w ww .j ava2 s .c om*/ } context.register(DataSourcePoolMetadataProvidersConfiguration.class, CacheStatisticsAutoConfiguration.class, PublicMetricsAutoConfiguration.class, MockServletWebServerFactory.class); context.refresh(); this.context = context; }