本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}