List of usage examples for org.springframework.boot.web.servlet ServletRegistrationBean setLoadOnStartup
public void setLoadOnStartup(int loadOnStartup)
From source file:org.joinfaces.richfaces.RichfacesSpringBootAutoConfiguration.java
@Bean public ServletRegistrationBean richfacesResourcesServlet() { ServletRegistrationBean result = new ServletRegistrationBean(); result.setServlet(new ResourceServlet()); result.setLoadOnStartup(1); result.addUrlMappings("/org.richfaces.resources/*"); return result; }
From source file:com.voxxed.bigdata.web.WebApp.java
/** * Bind the Camel servlet at the "/api" context path. *//*from www. jav a 2 s. c o m*/ @Bean ServletRegistrationBean servletRegistrationBean() { ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings("/api/*"); mapping.setName("CamelServlet"); mapping.setLoadOnStartup(1); return mapping; }
From source file:de.dlopes.stocks.facilitator.config.JsfMvcConfig.java
/** * Register the JSF's Faces servlet//from w w w. j a v a2 s . c om * * Hint: this is needed for proper initialization of JSF * * @return a ServletRegistrationBean containing the FacesServlet */ @Bean public ServletRegistrationBean facesServletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet()); registration.setLoadOnStartup(1); registration.addUrlMappings("*.faces"); return registration; }
From source file:de.dlopes.stocks.facilitator.config.JsfMvcConfig.java
/** * Register the Spring MVC dispatcher servlet under the context path '/app/*' * // w w w . j a va 2s . c om * hint: we need to do this otherwise there will be an overlap with JSF's * FacesServlet * * @return a ServletRegistrationBean containing the DispatcherServlet and it's * mapping */ @Bean public ServletRegistrationBean dispatcherServletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet()); registration.setLoadOnStartup(1); registration.setName(DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME); registration.addUrlMappings(config.getDispatcherServletCxtpth() + "/*"); return registration; }
From source file:com.evolveum.midpoint.web.boot.MidPointSpringApplication.java
@Bean public ServletRegistrationBean cxfServlet() { ServletRegistrationBean registration = new ServletRegistrationBean(); registration.setServlet(new CXFServlet()); registration.addInitParameter("service-list-path", "midpointservices"); registration.setLoadOnStartup(1); registration.addUrlMappings("/model/*", "/ws/*"); return registration; }
From source file:org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration.java
@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);//from w ww.j a v a 2s .c o m registration.setName(getServletRegistrationName()); registration.setLoadOnStartup(this.jersey.getServlet().getLoadOnStartup()); return registration; }