[bs-84] Add basic getting started guide to service project

Still work in progress, bubt enough there to get someone up a
nd running I hope
[#49047467]
This commit is contained in:
Dave Syer
2013-05-01 16:10:57 +01:00
parent bd79ec2362
commit ce0e443b0a
4 changed files with 252 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ import org.springframework.beans.BeansException;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.beans.factory.support.DefaultBeanNameGenerator;
import org.springframework.bootstrap.SpringApplication.AutoMain;
import org.springframework.bootstrap.context.embedded.AnnotationConfigEmbeddedWebApplicationContext;
import org.springframework.bootstrap.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
import org.springframework.context.ApplicationContext;
@@ -152,6 +153,15 @@ public class SpringApplicationTests {
assertThat(getEnvironment().getProperty("foo"), equalTo("bar"));
}
@Test
public void emptytApplicationContext() throws Exception {
// This is the class that will be used for main()
SpringApplication application = new SpringApplication(AutoMain.class);
this.context = application.run();
assertThat(this.context,
instanceOf(AnnotationConfigEmbeddedWebApplicationContext.class));
}
@Test
public void defaultApplicationContext() throws Exception {
SpringApplication application = new SpringApplication(ExampleConfig.class);