當前位置: 首頁>>代碼示例>>Java>>正文


Java ServletRegistrationBean.setLoadOnStartup方法代碼示例

本文整理匯總了Java中org.springframework.boot.context.embedded.ServletRegistrationBean.setLoadOnStartup方法的典型用法代碼示例。如果您正苦於以下問題:Java ServletRegistrationBean.setLoadOnStartup方法的具體用法?Java ServletRegistrationBean.setLoadOnStartup怎麽用?Java ServletRegistrationBean.setLoadOnStartup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.boot.context.embedded.ServletRegistrationBean的用法示例。


在下文中一共展示了ServletRegistrationBean.setLoadOnStartup方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: configServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean(name = "configServlet")
public ServletRegistrationBean configServlet() {
	DispatcherServlet dispatcherServlet = new DispatcherServlet();
	AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
	applicationContext.register(ConfigServletConfig.class);
	dispatcherServlet.setApplicationContext(applicationContext);
	ServletRegistrationBean registrationBean = new ServletRegistrationBean(dispatcherServlet, "/config/*");
	registrationBean.setLoadOnStartup(1);
	return registrationBean;
}
 
開發者ID:namics,項目名稱:spring-configuration-support,代碼行數:11,代碼來源:SampleApplication.java

示例2: facesServletRegistraiton

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean facesServletRegistraiton() {
	ServletRegistrationBean registration = new ServletRegistrationBean(new javax.faces.webapp.FacesServlet(),
			"*.xhtml");

	registration.setName("Faces Servlet");

	registration.setLoadOnStartup(1);

	return registration;
}
 
開發者ID:Arquisoft,項目名稱:Voting_2b,代碼行數:12,代碼來源:Main.java

示例3: facesServletRegistraiton

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean facesServletRegistraiton() {
    ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), "*.xhtml");
    registration.setName("Faces Servlet");
    registration.setLoadOnStartup(1);
    return registration;
}
 
開發者ID:Arquisoft,項目名稱:Voting_2b,代碼行數:8,代碼來源:Application.java

示例4: facesServletRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean facesServletRegistration() {
    ServletRegistrationBean registration = new ServletRegistrationBean(
            new FacesServlet(), "*.xhtml");
    registration.setLoadOnStartup(1);     
    return registration;
}
 
開發者ID:Arquisoft,項目名稱:VotingSystem_1b,代碼行數:8,代碼來源:Main.java

示例5: facesServletRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean facesServletRegistration() {
    ServletRegistrationBean registration = new ServletRegistrationBean(
            new FacesServlet(), "*.xhtml");
    registration.setLoadOnStartup(1);
    return registration;
}
 
開發者ID:Arquisoft,項目名稱:Voting_2b,代碼行數:8,代碼來源:Application.java

示例6: servletRegistrationBean

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
@Autowired
public ServletRegistrationBean servletRegistrationBean(MetricRegistry metricRegistry) {
    MetricsServlet ms = new MetricsServlet(metricRegistry);
    ServletRegistrationBean srb = new ServletRegistrationBean(ms, "/stats/*");
    srb.setLoadOnStartup(1);
    return srb;
}
 
開發者ID:przodownikR1,項目名稱:springJpaKata,代碼行數:9,代碼來源:MetricsConfig.java

示例7: servletHealthRegistryBean

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
@Autowired
public ServletRegistrationBean servletHealthRegistryBean(HealthCheckRegistry healthCheckRegistry) {
    HealthCheckServlet hc = new HealthCheckServlet(healthCheckRegistry);
    ServletRegistrationBean srb = new ServletRegistrationBean(hc, "/health/*");
    srb.setLoadOnStartup(2);
    return srb;
}
 
開發者ID:przodownikR1,項目名稱:springJpaKata,代碼行數:9,代碼來源:MetricsConfig.java

示例8: memoryMonitorStartupServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean memoryMonitorStartupServlet() {
	ServletRegistrationBean registration =
			new ServletRegistrationBean(new MemoryMonitorStartupServlet(), "/admin4j/memory");
	registration.setLoadOnStartup(1);
	return registration;
}
 
開發者ID:Derek-Ashmore,項目名稱:moneta,代碼行數:8,代碼來源:MonetaSpringBootApplication.java

示例9: atmosphereServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean atmosphereServlet() {
	// Dispatcher servlet is mapped to '/home' to allow the AtmosphereServlet
	// to be mapped to '/chat'
	ServletRegistrationBean registration = new ServletRegistrationBean(
			new AtmosphereServlet(), "/chat/*");
	registration.addInitParameter("org.atmosphere.cpr.packages", "sample");
	registration.addInitParameter("org.atmosphere.interceptor.HeartbeatInterceptor"
			+ ".clientHeartbeatFrequencyInSeconds", "10");
	registration.setLoadOnStartup(0);
	// Need to occur before the EmbeddedAtmosphereInitializer
	registration.setOrder(Ordered.HIGHEST_PRECEDENCE);
	return registration;
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:15,代碼來源:SampleAtmosphereApplication.java

示例10: servletRegistrationLessBean

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean servletRegistrationLessBean(){
    ServletRegistrationBean registrationBean = new ServletRegistrationBean(new LessServlet(), "*.less");
    registrationBean.setLoadOnStartup(1);
    registrationBean.setName("LessServlet");
    registrationBean.addInitParameter("cache", lessCached);
    return registrationBean;
}
 
開發者ID:angel-git,項目名稱:deep,代碼行數:9,代碼來源:Application.java

示例11: servletRegistrationCoffeeBean

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean servletRegistrationCoffeeBean(){
    ServletRegistrationBean registrationBean = new ServletRegistrationBean(new CoffeeServlet(), "*.coffee");
    registrationBean.setLoadOnStartup(1);
    registrationBean.setName("CoffeeScript");
    registrationBean.addInitParameter("cache",coffeeCached);
    return registrationBean;
}
 
開發者ID:angel-git,項目名稱:deep,代碼行數:9,代碼來源:Application.java

示例12: cxfServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean cxfServlet() {
	LOGGER.info("Initializing CXF");

	ServletRegistrationBean servletDef = new ServletRegistrationBean(new CXFServlet(), "/api/soap/*");
	servletDef.setLoadOnStartup(1);
	return servletDef;
}
 
開發者ID:orange-cloudfoundry,項目名稱:elpaaso-core,代碼行數:9,代碼來源:CxfInitializer.java

示例13: soapServletRegistrationBean

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean soapServletRegistrationBean() {
    log.info("+++  soapServletRegistration");
    ServletRegistrationBean registration = new ServletRegistrationBean(new CXFServlet(), "/services/*");
    registration.setLoadOnStartup(1);
    registration.setName("CXFServlet");
    return registration;
}
 
開發者ID:przodownikR1,項目名稱:cxf_over_jms_kata,代碼行數:9,代碼來源:CxfConfig.java

示例14: webflowServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean webflowServlet() {
	ServletRegistrationBean registration = new ServletRegistrationBean();
	registration.setServlet(new DispatcherServlet(new AnnotationConfigWebApplicationContext()));
	registration.addUrlMappings("/spring/*");
	registration.setLoadOnStartup(1);
	registration.setName("webflowServlet");
	return registration;
}
 
開發者ID:yanaga-samples,項目名稱:academico,代碼行數:10,代碼來源:WebflowConfig.java

示例15: repositoryServletRegistrationBean

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean repositoryServletRegistrationBean(
    RepositoryHttpServlet repositoryHttpServlet) {
  ServletRegistrationBean servletRegistrationBean =
      new ServletRegistrationBean(repositoryHttpServlet, "/repository_servlet/*");
  servletRegistrationBean.setLoadOnStartup(1);
  return servletRegistrationBean;
}
 
開發者ID:Kurento,項目名稱:kurento-java,代碼行數:9,代碼來源:RepositoryFunctionalTest.java


注:本文中的org.springframework.boot.context.embedded.ServletRegistrationBean.setLoadOnStartup方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。