本文整理汇总了Java中org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java ExampleEmbeddedWebApplicationConfiguration类的具体用法?Java ExampleEmbeddedWebApplicationConfiguration怎么用?Java ExampleEmbeddedWebApplicationConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExampleEmbeddedWebApplicationConfiguration类属于org.springframework.boot.context.embedded.config包,在下文中一共展示了ExampleEmbeddedWebApplicationConfiguration类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sessionScopeAvailable
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void sessionScopeAvailable() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(
ExampleEmbeddedWebApplicationConfiguration.class,
SessionScopedComponent.class);
verifyContext();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java
示例2: sessionScopeAvailableToServlet
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void sessionScopeAvailableToServlet() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(
ExampleEmbeddedWebApplicationConfiguration.class,
ExampleServletWithAutowired.class, SessionScopedComponent.class);
Servlet servlet = this.context.getBean(ExampleServletWithAutowired.class);
assertThat(servlet).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java
示例3: registerAndRefresh
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void registerAndRefresh() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext();
this.context.register(ExampleEmbeddedWebApplicationConfiguration.class);
this.context.refresh();
verifyContext();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java
示例4: scanAndRefresh
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void scanAndRefresh() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext();
this.context.scan(
ExampleEmbeddedWebApplicationConfiguration.class.getPackage().getName());
this.context.refresh();
verifyContext();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java
示例5: sessionScopeAvailableToServlet
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void sessionScopeAvailableToServlet() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(
ExampleEmbeddedWebApplicationConfiguration.class,
ExampleServletWithAutowired.class, SessionScopedComponent.class);
Servlet servlet = this.context.getBean(ExampleServletWithAutowired.class);
assertNotNull(servlet);
}
开发者ID:Nephilim84,项目名称:contestparser,代码行数:9,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java
示例6: createFromScan
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void createFromScan() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(
ExampleEmbeddedWebApplicationConfiguration.class.getPackage().getName());
verifyContext();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java
示例7: createFromConfigClass
import org.springframework.boot.context.embedded.config.ExampleEmbeddedWebApplicationConfiguration; //导入依赖的package包/类
@Test
public void createFromConfigClass() throws Exception {
this.context = new AnnotationConfigEmbeddedWebApplicationContext(
ExampleEmbeddedWebApplicationConfiguration.class);
verifyContext();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:AnnotationConfigEmbeddedWebApplicationContextTests.java