本文整理匯總了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