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


Java ServletRegistrationBean.setName方法代碼示例

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


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

示例1: 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

示例2: 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

示例3: dispatcherServletRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean(name = DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME)
public ServletRegistrationBean dispatcherServletRegistration() {
	ServletRegistrationBean registration = new ServletRegistrationBean(
			dispatcherServlet(), this.server.getServletMapping());
	registration.setName(DEFAULT_DISPATCHER_SERVLET_BEAN_NAME);
	if (this.multipartConfig != null) {
		registration.setMultipartConfig(this.multipartConfig);
	}
	return registration;
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:11,代碼來源:DispatcherServletAutoConfiguration.java

示例4: jerseyServletRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "jerseyServletRegistration")
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "servlet", matchIfMissing = true)
public ServletRegistrationBean jerseyServletRegistration() {
	ServletRegistrationBean registration = new ServletRegistrationBean(
			new ServletContainer(this.config), this.path);
	addInitParameters(registration);
	registration.setName("jerseyServlet");
	return registration;
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:11,代碼來源:JerseyAutoConfiguration.java

示例5: dispatcherServletRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherServletRegistration() {
	ServletRegistrationBean registration = new ServletRegistrationBean(
			new DispatcherServlet(), "/foo");
	registration.setName("customDispatcher");
	return registration;
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:8,代碼來源:DispatcherServletAutoConfigurationTests.java

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: camelServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean camelServlet() {
    ServletRegistrationBean registration = new ServletRegistrationBean(new CamelHttpTransportServlet(), "/camel/*");
    registration.setName("CamelServlet");
    return registration;
}
 
開發者ID:eddi888,項目名稱:ultrahouse3000,代碼行數:7,代碼來源:Application.java

示例11: jolokiaServlet

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean jolokiaServlet() {
    ServletRegistrationBean registration = new ServletRegistrationBean(new AgentServlet(), "/jolokia/*");
    registration.setName("JolokiaServlet");
    return registration;
}
 
開發者ID:eddi888,項目名稱:ultrahouse3000,代碼行數:7,代碼來源:Application.java

示例12: dispatcherRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration(FacesServlet dispatcherServlet) {
	final ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet, "*.xhtml", "/pages/**");
	registration.setName("FacesServlet");
	return registration;
}
 
開發者ID:osnircunha,項目名稱:SpringFrameworkSamples,代碼行數:7,代碼來源:JsfConfiguration.java


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